Examples of withPrefix()


Examples of com.amazonaws.services.s3.model.ListObjectsRequest.withPrefix()

        ListObjectsRequest listObjectsRequest = new ListObjectsRequest()
            .withBucketName(s3RepositoryPath.getBucketName());
        String prefix = ""; // capture prefix for debug logging
        if (s3RepositoryPath.hasBucketRelativeFolder()) {
            prefix = s3RepositoryPath.getBucketRelativeFolder() + "/" + WellKnowns.YUM_REPODATA_FOLDERNAME + "/";
            listObjectsRequest.withPrefix(prefix);
        }
        List<S3ObjectSummary> result = S3Utils.listAllObjects(context.getS3Session(), listObjectsRequest);
        for (S3ObjectSummary summary : result) {
            if (summary.getKey().endsWith("/")) {
                getLog().debug("Will not list " + summary.getKey() + ", it's a folder");
View Full Code Here

Examples of com.amazonaws.services.s3.model.ListObjectsRequest.withPrefix()

            List<String> repoRelativeFilePathList = context.getLocalYumRepo().parseFileListFromRepoMetadata();
            S3RepositoryPath s3RepositoryPath = context.getS3RepositoryPath();
            ListObjectsRequest request = new ListObjectsRequest()
                    .withBucketName(context.getS3RepositoryPath().getBucketName());
            if (s3RepositoryPath.hasBucketRelativeFolder()) {
                request.withPrefix(s3RepositoryPath.getBucketRelativeFolder() + "/");
            }
            List<S3ObjectSummary> result = S3Utils.listAllObjects(context.getS3Session(), request);
            // we will start with a set of metadata-declared files and remove any file we find that exists in the repo;
            // we expect the Set to be empty when finished iteration. note that s3 api returns bucket-relative
            // paths, so we prefix each of our repoRelativeFilePaths with the repository path.
View Full Code Here

Examples of com.amazonaws.services.s3.model.ListObjectsRequest.withPrefix()

        ListObjectsRequest listObjectsRequest = new ListObjectsRequest()
                .withBucketName(s3RepositoryPath.getBucketName());
        String prefix = ""; // capture prefix for debug logging
        if (s3RepositoryPath.hasBucketRelativeFolder()) {
            prefix = s3RepositoryPath.getBucketRelativeFolder() + "/";
            listObjectsRequest.withPrefix(prefix);
        }
        List<S3ObjectSummary> result = S3Utils.listAllObjects(context.getS3Session(), listObjectsRequest);
        getLog().debug("Found " + result.size() + " objects in bucket '" + s3RepositoryPath.getBucketName()
                + "' with prefix '" + s3RepositoryPath.getBucketRelativeFolder() + "/" + "'...");
        for (S3ObjectSummary summary : result) {
View Full Code Here

Examples of com.netflix.astyanax.serializers.CompositeRangeBuilder.withPrefix()

            for (int i = 0; i < nonNullFields.size(); i++) {
                Object objStart = nonNullFields.get(i).getValue(start);
                Object objEnd = nonNullFields.get(i).getValue(end);
                if (i + 1 != nonNullFields.size()) {
                    rangeBuilder.withPrefix(objStart);
                    LOG.debug("withPrefix(" + objStart + ")");
                } else {
                    rangeBuilder.greaterThanEquals(objStart);
                    LOG.debug("greaterThanEquals(" + objStart + ")");
                    rangeBuilder.lessThanEquals(objEnd);
View Full Code Here

Examples of org.apache.storm.hdfs.bolt.format.DefaultFileNameFormat.withPrefix()

    KarmaSequenceFormat sequenceFormat = new KarmaSequenceFormat("id", "json");
    sequenceFileBolt.withSequenceFormat(sequenceFormat);
    DefaultFileNameFormat fileNameFormat = new DefaultFileNameFormat();
    fileNameFormat.withExtension(".seq");
    fileNameFormat.withPath("/tmp/storm");
    fileNameFormat.withPrefix("karma");
    sequenceFileBolt.withFileNameFormat(fileNameFormat);
    sequenceFileBolt.withFsUrl("file:///");
    sequenceFileBolt.withSyncPolicy(new CountSyncPolicy(1));
    sequenceFileBolt.withRotationPolicy(new FileSizeRotationPolicy(1, Units.KB));
    Set<String> sources = new HashSet<String>();
View Full Code Here

Examples of org.jclouds.aws.s3.commands.options.ListBucketOptions.withPrefix()

    protected ListBucketResult executeListDirectoryRequest(
                  String prefix,
                  int marker )
    {
  ListBucketOptions opts = new ListBucketOptions( );
  opts.withPrefix( prefix );
  opts.afterMarker( String.valueOf( marker ) );
 
  Future<S3Bucket> listResult = _connection.listBucket( _bucket, opts );
  S3Bucket bucket = null;
  try
View Full Code Here

Examples of org.jclouds.s3.options.ListBucketOptions.withPrefix()

      }
      if (from.getDir() != null) {// TODO unit test
         String path = from.getDir();
         if (!path.endsWith("/"))
            path = path + "/";
         httpOptions.withPrefix(path);
      }
      if (from.getMarker() != null) {
         httpOptions.afterMarker(from.getMarker());
      }
      if (from.getMaxResults() != null) {
View Full Code Here

Examples of org.jclouds.s3.options.ListBucketOptions.withPrefix()

      }
      if (from.getDir() != null) {// TODO unit test
         String path = from.getDir();
         if (!path.endsWith("/"))
            path = path + "/";
         httpOptions.withPrefix(path);
      }
      if (from.getMarker() != null) {
         httpOptions.afterMarker(from.getMarker());
      }
      if (from.getMaxResults() != null) {
View Full Code Here

Examples of org.jclouds.s3.options.ListBucketOptions.withPrefix()

      }
      if (from.getDir() != null) {// TODO unit test
         String path = from.getDir();
         if (!path.endsWith("/"))
            path = path + "/";
         httpOptions.withPrefix(path);
      }
      if (from.getMarker() != null) {
         httpOptions.afterMarker(from.getMarker());
      }
      if (from.getMaxResults() != null) {
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.