Java Code Examples for org.apache.hadoop.conf.Configuration#getTimeDuration()
The following examples show how to use
org.apache.hadoop.conf.Configuration#getTimeDuration() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractReservationSystem.java From hadoop with Apache License 2.0 | 6 votes |
private void initialize(Configuration conf) throws YarnException { LOG.info("Initializing Reservation system"); this.conf = conf; scheduler = rmContext.getScheduler(); // Get the plan step size planStepSize = conf.getTimeDuration( YarnConfiguration.RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, TimeUnit.MILLISECONDS); if (planStepSize < 0) { planStepSize = YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP; } // Create a plan corresponding to every reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } }
Example 2
Source File: AbstractReservationSystem.java From big-c with Apache License 2.0 | 6 votes |
private void initialize(Configuration conf) throws YarnException { LOG.info("Initializing Reservation system"); this.conf = conf; scheduler = rmContext.getScheduler(); // Get the plan step size planStepSize = conf.getTimeDuration( YarnConfiguration.RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP, TimeUnit.MILLISECONDS); if (planStepSize < 0) { planStepSize = YarnConfiguration.DEFAULT_RM_RESERVATION_SYSTEM_PLAN_FOLLOWER_TIME_STEP; } // Create a plan corresponding to every reservable queue Set<String> planQueueNames = scheduler.getPlanQueues(); for (String planQueueName : planQueueNames) { Plan plan = initializePlan(planQueueName); plans.put(planQueueName, plan); } }
Example 3
Source File: RemoteNodeFileSystem.java From dremio-oss with Apache License 2.0 | 5 votes |
@Override public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); if (name.getHost() == null || name.getPort() == -1) { throw new IllegalArgumentException("FileSystem name needs a complete authority element."); } uri = name; listStatusBatchSize = conf.getInt(LIST_STATUS_BATCH_SIZE_KEY, LIST_STATUS_BATCH_SIZE_DEFAULT); writeBufferSize = conf.getInt(REMOTE_WRITE_BUFFER_SIZE_KEY, REMOTE_WRITE_BUFFER_SIZE_DEFAULT); rpcTimeoutMs = conf.getTimeDuration(RPC_TIMEOUT_KEY, RPC_TIMEOUT_MS_DEFAULT, TimeUnit.MILLISECONDS); }