Package com.splunk.shuttl.archiver.filesystem

Examples of com.splunk.shuttl.archiver.filesystem.PathResolver


  public void setUp() {
    ArchiveConfiguration config = TUtilsFunctional
        .getLocalFileSystemConfiguration();
    localFileSystem = ArchiveFileSystemFactory.getWithConfiguration(config);

    pathResolver = new PathResolver(config);
    localFileSystemPaths = new LocalFileSystemPaths(createDirectory());
    flatFileStorage = new FlatFileStorage(localFileSystemPaths);
    metadataStore = new MetadataStore(pathResolver, flatFileStorage,
        localFileSystem, new TransactionExecuter(), localFileSystemPaths);
View Full Code Here


  private void setUp(String hadoopHost, String hadoopPort)
      throws InstanceNotFoundException {
    config = ArchiveConfiguration.getSharedInstance();
    ShuttlServerMBean serverMBean = ShuttlServer.getMBeanProxy();
    localFileSystemPaths = LocalFileSystemPaths.create();
    pathResolver = new PathResolver(config);
    hadoopFileSystem = getHadoopFileSystem(hadoopHost, hadoopPort);

    IndexPreservingBucketMover bucketMover = IndexPreservingBucketMover
        .create(localFileSystemPaths.getSafeDirectory());
    BucketLocker bucketLocker = new ArchiveBucketLocker();
View Full Code Here

    ArchiveFileSystem localFileSystem = ArchiveFileSystemFactory
        .getWithConfiguration(csvConfig);
    csvBucketArchiver = BucketShuttlerFactory
        .createWithConfFileSystemAndLocalPaths(csvConfig, localFileSystem,
            new LocalFileSystemPaths(archiverData.getAbsolutePath()));
    PathResolver pathResolver = new PathResolver(csvConfig);
    ArchivedIndexesLister indexesLister = new ArchivedIndexesLister(
        pathResolver, localFileSystem);
    bucketsLister = new ArchiveBucketsLister(localFileSystem, indexesLister,
        pathResolver);
    BucketFormatChooser bucketFormatChooser = new BucketFormatChooser(csvConfig);
View Full Code Here

    ArchiveFileSystem archiveFileSystem = ArchiveFileSystemFactory
        .getWithConfiguration(config);
    archiverData = createDirectory();
    LocalFileSystemPaths localFileSystemPaths = new LocalFileSystemPaths(
        archiverData.getAbsolutePath());
    PathResolver pathResolver = new PathResolver(config);
    archiveBucketSize = ArchiveBucketSize.create(pathResolver,
        archiveFileSystem, localFileSystemPaths);
    listsBucketsFiltered = ListsBucketsFilteredFactory.create(config);
    bucketArchiver = BucketShuttlerFactory
        .createWithConfFileSystemAndLocalPaths(config, archiveFileSystem,
View Full Code Here

    @Override
    public void run() {
      ArchiveConfiguration config = ArchiveConfiguration
          .createConfigurationFromMBean();
      PathResolver pathResolver = new PathResolver(config);
      String normalBucketName = replicatedBucket.getName().replaceFirst("rb",
          "db");
      Bucket normalBucket = new Bucket(replicatedBucket.getPath(),
          replicatedBucket.getIndex(), normalBucketName,
          replicatedBucket.getFormat());
      String archivePath = pathResolver.resolveArchivePath(normalBucket);
      ArchiveFileSystem archiveFileSystem = ArchiveFileSystemFactory
          .getWithConfiguration(config);
      try {
        archivePathAsserter.assertStateOfArchivePathOnFileSystem(archivePath,
            archiveFileSystem);
View Full Code Here

    archiveFileSystem = ArchiveFileSystemFactory.getWithConfiguration(config);
    archiverData = createDirectory();
    bucketArchiver = BucketShuttlerFactory
        .createWithConfFileSystemAndLocalPaths(config, archiveFileSystem,
            new LocalFileSystemPaths(archiverData.getAbsolutePath()));
    pathResolver = new PathResolver(config);
  }
View Full Code Here

      @Override
      public void run() {
        HadoopArchiveFileSystem fs = (HadoopArchiveFileSystem) ArchiveFileSystemFactory
            .getConfiguredArchiveFileSystem();
        PathResolver pathResolver = new PathResolver(ArchiveConfiguration
            .createConfigurationFromMBean());
        fs.deletePath(pathResolver.getServerNamesHome());
      }
    });
  }
View Full Code Here

  }

  private void assertBucketWasArchived(LocalBucket bucket) {
    ArchiveConfiguration config = ArchiveConfiguration
        .createConfigurationFromMBean();
    PathResolver pathResolver = new PathResolver(config);
    ArchiveFileSystem archive = ArchiveFileSystemFactory
        .getWithConfiguration(config);
    try {
      assertTrue(archive.exists(pathResolver.resolveArchivePath(bucket)));
    } catch (Exception e) {
      TUtilsTestNG.failForException(null, e);
    }
  }
View Full Code Here

  }

  private void asserBucketWasArchived(LocalBucket bucket) throws IOException {
    ArchiveConfiguration config = ArchiveConfiguration
        .createConfigurationFromMBean();
    String archivePath = new PathResolver(config).resolveArchivePath(bucket);
    assertTrue(ArchiveFileSystemFactory.getWithConfiguration(config).exists(
        archivePath));
  }
View Full Code Here

      LocalBucket bucket) {
    ArchiveConfiguration config = ArchiveConfiguration
        .createConfigurationFromMBean();
    HadoopArchiveFileSystem fileSystem = (HadoopArchiveFileSystem) ArchiveFileSystemFactory
        .getWithConfiguration(config);
    PathResolver pathResolver = new PathResolver(config);

    String bucketArchivePath = pathResolver.resolveArchivePath(bucket);
    try {
      assertTrue(fileSystem.exists(bucketArchivePath),
          "BucketArchivePath did not exist: " + bucketArchivePath);
    } catch (IOException e) {
      TUtilsTestNG.failForException(
View Full Code Here

TOP

Related Classes of com.splunk.shuttl.archiver.filesystem.PathResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.