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

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

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

origin: apache/incubator-druid

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

    new BackgroundSegmentAnnouncer(announcer, exec, config.getAnnounceIntervalMillis())) {
loadingExecutor = Execs.multiThreaded(config.getNumBootstrapThreads(), "Segment-Load-Startup-%s");
origin: apache/incubator-druid

 @Override
 public void run()
 {
  try {
   synchronized (segmentDeleteLock) {
    if (segmentsToDelete.remove(segment)) {
     segmentManager.dropSegment(segment);
     File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getId().toString());
     if (!segmentInfoCacheFile.delete()) {
      log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile);
     }
    }
   }
  }
  catch (Exception e) {
   log.makeAlert(e, "Failed to remove segment! Possible resource leak!")
     .addData("segment", segment)
     .emit();
  }
 }
};
origin: apache/incubator-druid

public SegmentLoaderConfig withLocations(List<StorageLocationConfig> locations)
{
 SegmentLoaderConfig retVal = new SegmentLoaderConfig();
 retVal.locations = Lists.newArrayList(locations);
 retVal.deleteOnRemove = this.deleteOnRemove;
 retVal.infoDir = this.infoDir;
 return retVal;
}
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

  "Completely removing [%s] in [%,d] millis",
  segment.getId(),
  config.getDropSegmentDelayMillis()
);
exec.schedule(
  runnable,
  config.getDropSegmentDelayMillis(),
  TimeUnit.MILLISECONDS
);
origin: apache/incubator-druid

new SegmentLoaderConfig(),
EasyMock.createNiceMock(DataSegmentAnnouncer.class),
EasyMock.createNiceMock(DataSegmentServerAnnouncer.class),
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: org.apache.druid/druid-server

  "Completely removing [%s] in [%,d] millis",
  segment.getIdentifier(),
  config.getDropSegmentDelayMillis()
);
exec.schedule(
  runnable,
  config.getDropSegmentDelayMillis(),
  TimeUnit.MILLISECONDS
);
origin: apache/incubator-druid

   .toInstance(new SegmentLoaderConfig().withLocations(Collections.emptyList()));
binder.bind(CoordinatorClient.class).in(LazySingleton.class);
origin: org.apache.druid/druid-server

public SegmentLoaderConfig withLocations(List<StorageLocationConfig> locations)
{
 SegmentLoaderConfig retVal = new SegmentLoaderConfig();
 retVal.locations = Lists.newArrayList(locations);
 retVal.deleteOnRemove = this.deleteOnRemove;
 retVal.infoDir = this.infoDir;
 return retVal;
}
origin: org.apache.druid/druid-server

    new BackgroundSegmentAnnouncer(announcer, exec, config.getAnnounceIntervalMillis())) {
loadingExecutor = Execs.multiThreaded(config.getNumBootstrapThreads(), "Segment-Load-Startup-%s");
origin: apache/incubator-druid

File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getId().toString());
if (!segmentInfoCacheFile.exists()) {
 try {
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

@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

private void loadLocalCache()
 File baseDir = config.getInfoDir();
 if (!baseDir.isDirectory()) {
  if (baseDir.exists()) {
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: apache/incubator-druid

  new SegmentLoaderConfig().withLocations(locations),
  jsonMapper
);
origin: org.apache.druid/druid-server

File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getIdentifier());
if (!segmentInfoCacheFile.exists()) {
 try {
origin: apache/incubator-druid

  new SegmentLoaderConfig().withLocations(locations),
  jsonMapper
);
org.apache.druid.segment.loadingSegmentLoaderConfig

Most used methods

  • <init>
  • withLocations
  • getAnnounceIntervalMillis
  • getDropSegmentDelayMillis
  • getInfoDir
  • getLocations
  • getNumBootstrapThreads
  • getNumLoadingThreads
  • getStatusQueueMaxSize
  • isDeleteOnRemove

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for Android Studio
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