Tabnine Logo
StorageLocationConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
StorageLocationConfig
in
org.apache.druid.segment.loading

Best Java code snippets using org.apache.druid.segment.loading.StorageLocationConfig (Showing top 14 results out of 315)

origin: apache/incubator-druid

 @Override
 public List<StorageLocationConfig> getLocations()
 {
  return Collections.singletonList(
    new StorageLocationConfig().setPath(cacheDir)
  );
 }
},
origin: apache/incubator-druid

@Inject
public SegmentLoaderLocalCacheManager(
  IndexIO indexIO,
  SegmentLoaderConfig config,
  @Json ObjectMapper mapper
)
{
 this.indexIO = indexIO;
 this.config = config;
 this.jsonMapper = mapper;
 this.locations = new ArrayList<>();
 for (StorageLocationConfig locationConfig : config.getLocations()) {
  locations.add(new StorageLocation(
    locationConfig.getPath(),
    locationConfig.getMaxSize(),
    locationConfig.getFreeSpacePercent()
  ));
 }
}
origin: apache/incubator-druid

@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
 );
}
origin: apache/incubator-druid

public File getInfoDir()
{
 if (infoDir == null) {
  if (locations == null || locations.size() == 0) {
   throw new ISE("You have no segment cache locations defined. Please configure druid.segmentCache.locations to use one or more locations.");
  }
  infoDir = new File(locations.get(0).getPath(), "info_dir");
 }
 return infoDir;
}
origin: apache/incubator-druid

final StorageLocationConfig locationConfig = new StorageLocationConfig();
final File localStorageFolder = tmpFolder.newFolder("local_storage_folder");
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);
origin: apache/incubator-druid

 @Inject
 public DruidSysMonitor(
   SegmentLoaderConfig config
 )
 {
  final List<StorageLocationConfig> locs = config.getLocations();
  List<String> dirs = Lists.newArrayListWithExpectedSize(locs.size());
  for (StorageLocationConfig loc : locs) {
   dirs.add(loc.getPath().toString());
  }

  addDirectoriesToMonitor(dirs.toArray(new String[0]));
 }
}
origin: apache/incubator-druid

final StorageLocationConfig locationConfig = new StorageLocationConfig();
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);
origin: apache/incubator-druid

 public SegmentLoader manufacturate(File storageDir)
 {
  return loader.withConfig(
    new SegmentLoaderConfig().withLocations(Collections.singletonList(new StorageLocationConfig().setPath(storageDir)))
  );
 }
}
origin: org.apache.druid/druid-server

@Inject
public SegmentLoaderLocalCacheManager(
  IndexIO indexIO,
  SegmentLoaderConfig config,
  @Json ObjectMapper mapper
)
{
 this.indexIO = indexIO;
 this.config = config;
 this.jsonMapper = mapper;
 this.locations = Lists.newArrayList();
 for (StorageLocationConfig locationConfig : config.getLocations()) {
  locations.add(new StorageLocation(
    locationConfig.getPath(),
    locationConfig.getMaxSize(),
    locationConfig.getFreeSpacePercent()
  ));
 }
}
origin: org.apache.druid/druid-server

public File getInfoDir()
{
 if (infoDir == null) {
  if (locations == null || locations.size() == 0) {
   throw new ISE("You have no segment cache locations defined. Please configure druid.segmentCache.locations to use one or more locations.");
  }
  infoDir = new File(locations.get(0).getPath(), "info_dir");
 }
 return infoDir;
}
origin: apache/incubator-druid

final StorageLocationConfig locationConfig = new StorageLocationConfig();
final File localStorageFolder = tmpFolder.newFolder("local_storage_folder");
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);
origin: org.apache.druid/druid-indexing-service

 public SegmentLoader manufacturate(File storageDir)
 {
  return loader.withConfig(
    new SegmentLoaderConfig().withLocations(Collections.singletonList(new StorageLocationConfig().setPath(storageDir)))
  );
 }
}
origin: org.apache.druid/druid-server

 @Inject
 public DruidSysMonitor(
   SegmentLoaderConfig config
 )
 {
  final List<StorageLocationConfig> locs = config.getLocations();
  List<String> dirs = Lists.newArrayListWithExpectedSize(locs.size());
  for (StorageLocationConfig loc : locs) {
   dirs.add(loc.getPath().toString());
  }

  addDirectoriesToMonitor(dirs.toArray(new String[0]));
 }
}
origin: apache/incubator-druid

final StorageLocationConfig locationConfig = new StorageLocationConfig();
final File localStorageFolder = tmpFolder.newFolder("local_storage_folder");
localStorageFolder.setWritable(true);
locationConfig.setPath(localStorageFolder);
locationConfig.setMaxSize(10L);
locations.add(locationConfig);
final StorageLocationConfig locationConfig2 = new StorageLocationConfig();
final File localStorageFolder2 = tmpFolder.newFolder("local_storage_folder2");
localStorageFolder2.setWritable(true);
locationConfig2.setPath(localStorageFolder2);
locationConfig2.setMaxSize(10L);
locations.add(locationConfig2);
org.apache.druid.segment.loadingStorageLocationConfig

Most used methods

  • <init>
  • setPath
  • getFreeSpacePercent
  • getMaxSize
  • getPath
  • setMaxSize

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now