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; }
@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])); } }
@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() )); } }
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; }
@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])); } }
@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() )); } }