当前位置: 首页>>代码示例>>Java>>正文


Java S3Credentials类代码示例

本文整理汇总了Java中org.apache.hadoop.fs.s3.S3Credentials的典型用法代码示例。如果您正苦于以下问题:Java S3Credentials类的具体用法?Java S3Credentials怎么用?Java S3Credentials使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


S3Credentials类属于org.apache.hadoop.fs.s3包,在下文中一共展示了S3Credentials类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.apache.hadoop.fs.s3.S3Credentials; //导入依赖的package包/类
@Override
public void initialize(URI uri, Configuration conf) throws IOException {
  S3Credentials s3Credentials = new S3Credentials();
  s3Credentials.initialize(uri, conf);
  try {
    AWSCredentials awsCredentials =
      new AWSCredentials(s3Credentials.getAccessKey(),
          s3Credentials.getSecretAccessKey());
    this.s3Service = new RestS3Service(awsCredentials);
  } catch (S3ServiceException e) {
    handleException(e);
  }
  multipartEnabled =
      conf.getBoolean("fs.s3n.multipart.uploads.enabled", false);
  multipartBlockSize = Math.min(
      conf.getLong("fs.s3n.multipart.uploads.block.size", 64 * 1024 * 1024),
      MAX_PART_SIZE);
  multipartCopyBlockSize = Math.min(
      conf.getLong("fs.s3n.multipart.copy.block.size", MAX_PART_SIZE),
      MAX_PART_SIZE);
  serverSideEncryptionAlgorithm = conf.get("fs.s3n.server-side-encryption-algorithm");

  bucket = new S3Bucket(uri.getHost());
}
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:Jets3tNativeFileSystemStore.java

示例2: initialize

import org.apache.hadoop.fs.s3.S3Credentials; //导入依赖的package包/类
public void initialize(URI uri, Configuration conf) throws IOException {
  S3Credentials s3Credentials = new S3Credentials();
  s3Credentials.initialize(uri, conf);
  try {
    AWSCredentials awsCredentials =
      new AWSCredentials(s3Credentials.getAccessKey(),
          s3Credentials.getSecretAccessKey());
    this.s3Service = new RestS3Service(awsCredentials);
  } catch (S3ServiceException e) {
    if (e.getCause() instanceof IOException) {
      throw (IOException) e.getCause();
    }
    throw new S3Exception(e);
  }
  bucket = new S3Bucket(uri.getHost());
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:17,代码来源:Jets3tNativeFileSystemStore.java

示例3: initialize

import org.apache.hadoop.fs.s3.S3Credentials; //导入依赖的package包/类
@Override
public void initialize(URI uri, Configuration conf) throws IOException {
  S3Credentials s3Credentials = new S3Credentials();
  s3Credentials.initialize(uri, conf);
  try {
    AWSCredentials awsCredentials =
      new AWSCredentials(s3Credentials.getAccessKey(),
          s3Credentials.getSecretAccessKey());
    this.s3Service = new RestS3Service(awsCredentials);
  } catch (S3ServiceException e) {
    handleS3ServiceException(e);
  }
  multipartEnabled =
      conf.getBoolean("fs.s3n.multipart.uploads.enabled", false);
  multipartBlockSize = Math.min(
      conf.getLong("fs.s3n.multipart.uploads.block.size", 64 * 1024 * 1024),
      MAX_PART_SIZE);
  multipartCopyBlockSize = Math.min(
      conf.getLong("fs.s3n.multipart.copy.block.size", MAX_PART_SIZE),
      MAX_PART_SIZE);

  bucket = new S3Bucket(uri.getHost());
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:24,代码来源:Jets3tNativeFileSystemStore.java

示例4: initialize

import org.apache.hadoop.fs.s3.S3Credentials; //导入依赖的package包/类
@Override
public void initialize(URI uri, Configuration conf) throws IOException {
  S3Credentials s3Credentials = new S3Credentials();
  s3Credentials.initialize(uri, conf);
  try {
    AWSCredentials awsCredentials =
      new AWSCredentials(s3Credentials.getAccessKey(),
          s3Credentials.getSecretAccessKey());
    this.s3Service = new RestS3Service(awsCredentials);
  } catch (S3ServiceException e) {
    handleServiceException(e);
  }
  bucket = new S3Bucket(uri.getHost());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:15,代码来源:Jets3tNativeFileSystemStore.java

示例5: initialize

import org.apache.hadoop.fs.s3.S3Credentials; //导入依赖的package包/类
public void initialize(URI uri, Configuration conf) throws IOException {
  S3Credentials s3Credentials = new S3Credentials();
  s3Credentials.initialize(uri, conf);
  try {
    AWSCredentials awsCredentials =
      new AWSCredentials(s3Credentials.getAccessKey(),
          s3Credentials.getSecretAccessKey());
    this.s3Service = new RestS3Service(awsCredentials);
  } catch (S3ServiceException e) {
    handleServiceException(e);
  }
  bucket = new S3Bucket(uri.getHost());
}
 
开发者ID:indix,项目名称:dfs-datastores,代码行数:14,代码来源:IxJets3tNativeFileSystemStore.java


注:本文中的org.apache.hadoop.fs.s3.S3Credentials类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。