Package com.splunk.shuttl.archiver.model

Examples of com.splunk.shuttl.archiver.model.Bucket


    isBucketEqualTest();
  }

  public void isBucketEqualOnIndexFormatAndName_nameNull_true()
      throws IOException {
    bucket1 = new Bucket(path, index, null, format);
    bucket2 = new Bucket(path, index, null, format);
    isBucketEqualTest();
  }
View Full Code Here


    isBucketEqualTest();
  }

  public void isBucketEqualOnIndexFormatAndName_formatNull_true()
      throws IOException {
    bucket1 = new Bucket(path, index, name, null);
    bucket2 = new Bucket(path, index, name, null);
    isBucketEqualTest();
  }
View Full Code Here

        .isBucketEqualOnIndexFormatAndName(bucket1, bucket2));
  }

  public void isBucketEqualOnIndexFormatAndName_oneIndexNull_false()
      throws IOException {
    bucket1 = new Bucket(path, null, name, format);
    bucket2 = new Bucket(path, index, name, format);
    isBucketDifferentTest();
    bucket1 = new Bucket(path, index, name, format);
    bucket2 = new Bucket(path, null, name, format);
    isBucketDifferentTest();
  }
View Full Code Here

    isBucketDifferentTest();
  }

  public void isBucketEqualOnIndexFormatAndName_oneNameNull_false()
      throws IOException {
    bucket1 = new Bucket(path, index, null, format);
    bucket2 = new Bucket(path, index, name, format);
    isBucketDifferentTest();
    bucket1 = new Bucket(path, index, name, format);
    bucket2 = new Bucket(path, index, null, format);
    isBucketDifferentTest();
  }
View Full Code Here

    isBucketDifferentTest();
  }

  public void isBucketEqualOnIndexFormatAndName_oneFormatNull_false()
      throws IOException {
    bucket1 = new Bucket(path, index, name, null);
    bucket2 = new Bucket(path, index, name, format);
    isBucketDifferentTest();
    bucket1 = new Bucket(path, index, name, format);
    bucket2 = new Bucket(path, index, name, null);
    isBucketDifferentTest();
  }
View Full Code Here

    Flusher flusher = new Flusher(splunkIndexesLayer);
    flusher.flush(index, later, later);

    List<Bucket> flushedBuckets = flusher.getFlushedBuckets();
    assertEquals(1, flushedBuckets.size());
    Bucket flushedBucket = flushedBuckets.get(0);
    assertEquals(b2.getName(), flushedBucket.getName());
    assertEquals(b2.getIndex(), flushedBucket.getIndex());
  }
View Full Code Here

  @Test(groups = { "fast-unit" })
  public void _whenBucketIsAlreadyInThatFormat_returnTheSameBucket() {
    LocalBucket bucket = mock(LocalBucket.class);
    when(bucket.getFormat()).thenReturn(BucketFormat.SPLUNK_BUCKET);
    Bucket exportedToFormat = bucketExportController.exportBucket(bucket,
        BucketFormat.SPLUNK_BUCKET);
    assertSame(bucket, exportedToFormat);
  }
View Full Code Here

  public void _givenCsvBucket_exportsSplunkBucketWithCsvExporter() {
    LocalBucket bucket = TUtilsBucket.createBucket();
    LocalBucket csvBucket = mock(LocalBucket.class);
    when(csvChanger.exportBucket(bucket)).thenReturn(csvBucket);
    Bucket newBucket = bucketExportController.exportBucket(bucket, BucketFormat.CSV);
    assertEquals(csvBucket, newBucket);
  }
View Full Code Here

    FileUtils.deleteQuietly(dir);
  }

  @Test(groups = { "fast-unit" })
  public void _givenFileAndBucket_bucketNamedAsFileWithoutTheExtension() {
    Bucket createdBucket = bucketFileCreator.createBucketWithFile(file, bucket);
    String fileWithoutExtension = UtilsFile.getFileNameSansExt(file,
        getExtension());
    assertEquals(createdBucket.getName(), fileWithoutExtension);
  }
View Full Code Here

        getExtension());
    assertEquals(createdBucket.getName(), fileWithoutExtension);
  }

  public void _givenFileAndBucket_newBucketObjectKeepsOldBucketSize() {
    Bucket newBucket = bucketFileCreator.createBucketWithFile(file, bucket);
    assertEquals(bucket.getSize(), newBucket.getSize());

  }
View Full Code Here

TOP

Related Classes of com.splunk.shuttl.archiver.model.Bucket

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.