Examples of HadoopArchiveFileSystem


Examples of com.splunk.shuttl.archiver.filesystem.hadoop.HadoopArchiveFileSystem

  private static ArchiveFileSystem create(String scheme) {
    AWSCredentialsImpl credentials = AWSCredentialsImpl.create();
    URI s3Uri = createS3UriForHadoopFileSystem(scheme, credentials);

    try {
      return new HadoopArchiveFileSystem(FileSystem.get(s3Uri,
          new Configuration()));
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of com.splunk.shuttl.archiver.filesystem.hadoop.HadoopArchiveFileSystem

  }

  private static ArchiveFileSystem supportedArchiveFileSystem(String backend,
      LocalFileSystemPaths localFileSystemPaths) {
    if (backend.equals(LOCAL_FILESYSTEM_BACKEND_NAME))
      return new HadoopArchiveFileSystem(
          getHadoopFileSystemSafe(URI.create("file:/")));
    else if (backend.equals("hdfs"))
      return HadoopArchiveFileSystemFactory.create();
    else if (backend.equals("s3"))
      return S3ArchiveFileSystemFactory.createS3();
View Full Code Here

Examples of com.splunk.shuttl.archiver.filesystem.hadoop.HadoopArchiveFileSystem

  private static void cleanHadoopFileSystemWithSplunkHomeSet(File shuttlConfDir) {
    TUtilsMBean.runWithRegisteredMBeans(shuttlConfDir, new Runnable() {

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

Examples of com.splunk.shuttl.archiver.filesystem.hadoop.HadoopArchiveFileSystem

  private void assertBucketWasCopiedToArchiveFileSystem_withTeardown(
      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(
          "Checking for existing bucket path throwed.", e);
    } finally {
      fileSystem.deletePath(bucketArchivePath);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.