Package com.splunk.shuttl.archiver.archive

Examples of com.splunk.shuttl.archiver.archive.BucketFormat


    verify(archiveFileSystem).listPath(formatsHome);
  }

  public void resolveBucketsFormats_givenFormatPaths_directoryNameIsFormat()
      throws IOException {
    BucketFormat format = BucketFormat.SPLUNK_BUCKET;
    String formatPath = "/path/" + format;
    when(archiveFileSystem.listPath(anyString())).thenReturn(
        Arrays.asList(formatPath));
    bucketFormatResolver.resolveBucketsFormats(mockedBucketsList);
    verify(bucketFormatChooser).chooseBucketFormat(Arrays.asList(format));
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  public void resolveBucketsFormats_givenChosenFormat_resolvingPathForBucketWithFormat() {
    Bucket bucket = TUtilsBucket.createBucket();
    BucketFormat format = BucketFormat.SPLUNK_BUCKET;
    when(bucketFormatChooser.chooseBucketFormat(anyList())).thenReturn(format);

    bucketFormatResolver.resolveBucketsFormats(Arrays.asList(bucket));

    verify(pathResolver).resolveArchivedBucketPath(bucket.getIndex(),
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public void resolveBucketsFormats_givenBucketToResolveForAndChosenFormat_bucketWithFormatIndexAndName() {
    Bucket bucket = TUtilsBucket.createBucket();
    BucketFormat format = BucketFormat.SPLUNK_BUCKET;
    when(bucketFormatChooser.chooseBucketFormat(anyList())).thenReturn(format);
    List<Bucket> bucketsWithFormat = bucketFormatResolver
        .resolveBucketsFormats(Arrays.asList(bucket));

    // Verify
View Full Code Here

    Bucket bucket = newBucket("index-name", fakeBucket.getDirectory());
    assertEquals(bucket.getFormat(), BucketFormat.SPLUNK_BUCKET);
  }

  public void getFormat_createWithFormat_getsFormat() throws IOException {
    BucketFormat format = BucketFormat.UNKNOWN;
    Bucket bucket = new Bucket(null, null, null, format);
    assertEquals(format, bucket.getFormat());
  }
View Full Code Here

  /**
   * @return configuration configurated for using local file system and CSV
   *         format for buckets.
   */
  public static ArchiveConfiguration getLocalCsvArchiveConfigration() {
    BucketFormat bucketFormat = BucketFormat.CSV;
    return getLocalFileSystemConfigurationWithFormat(bucketFormat);
  }
View Full Code Here

TOP

Related Classes of com.splunk.shuttl.archiver.archive.BucketFormat

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.