public SegmentLoader manufacturate(File storageDir) { return loader.withConfig( new SegmentLoaderConfig().withLocations(Collections.singletonList(new StorageLocationConfig().setPath(storageDir))) ); } }
@Override public List<StorageLocationConfig> getLocations() { return Collections.singletonList( new StorageLocationConfig().setPath(cacheDir) ); } },
final File localStorageFolder = tmpFolder.newFolder("local_storage_folder"); localStorageFolder.setWritable(true); locationConfig.setPath(localStorageFolder); locationConfig.setMaxSize(10L); locations.add(locationConfig); final File localStorageFolder2 = tmpFolder.newFolder("local_storage_folder2"); localStorageFolder2.setWritable(true); locationConfig2.setPath(localStorageFolder2); locationConfig2.setMaxSize(10L); locations.add(locationConfig2);
@Before public void setUp() throws Exception { EmittingLogger.registerEmitter(new NoopServiceEmitter()); localSegmentCacheFolder = tmpFolder.newFolder("segment_cache_folder"); final List<StorageLocationConfig> locations = new ArrayList<>(); final StorageLocationConfig locationConfig = new StorageLocationConfig(); locationConfig.setPath(localSegmentCacheFolder); locationConfig.setMaxSize(10000000000L); locations.add(locationConfig); manager = new SegmentLoaderLocalCacheManager( TestHelper.getTestIndexIO(), new SegmentLoaderConfig().withLocations(locations), jsonMapper ); }
locationConfig.setPath(localStorageFolder); locationConfig.setMaxSize(1000000000L); locations.add(locationConfig); final StorageLocationConfig locationConfig2 = new StorageLocationConfig(); final File localStorageFolder2 = tmpFolder.newFolder("local_storage_folder2"); locationConfig2.setPath(localStorageFolder2); locationConfig2.setMaxSize(10000000L); locations.add(locationConfig2);
locationConfig.setPath(localStorageFolder); locationConfig.setMaxSize(10000000000L); locations.add(locationConfig); final StorageLocationConfig locationConfig2 = new StorageLocationConfig(); final File localStorageFolder2 = tmpFolder.newFolder("local_storage_folder2"); locationConfig2.setPath(localStorageFolder2); locationConfig2.setMaxSize(1000000000L); locations.add(locationConfig2);
public SegmentLoader manufacturate(File storageDir) { return loader.withConfig( new SegmentLoaderConfig().withLocations(Collections.singletonList(new StorageLocationConfig().setPath(storageDir))) ); } }