/** * Call response. * * @param <T> the type parameter * @param callable the callable * @param alluxioConf the alluxio conf * @return the response */ public static <T> Response call(RestUtils.RestCallable<T> callable, AlluxioConfiguration alluxioConf) { return call(callable, alluxioConf, null); }
/** * @return the service version */ @GET @Path(ServiceConstants.SERVICE_VERSION) public Response getServiceVersion() { return RestUtils.call(new RestUtils.RestCallable<Integer>() { @Override public Integer call() throws Exception { return Constants.JOB_MASTER_CLIENT_SERVICE_VERSION; } }, ServerConfiguration.global()); }
/** * @summary get the used bytes of the worker * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_USED_BYTES) @ReturnType("java.lang.Long") @Deprecated public Response getUsedBytes() { return RestUtils.call(mStoreMeta::getUsedBytes, ServerConfiguration.global()); }
/** * @summary get the service name * @return the response object */ @GET @Path(SERVICE_NAME) @ReturnType("java.lang.String") public Response getServiceName() { return RestUtils.call(() -> Constants.BLOCK_MASTER_CLIENT_SERVICE_NAME, ServerConfiguration.global()); }
/** * @summary get the version of the worker * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_VERSION) @ReturnType("java.lang.String") @Deprecated public Response getVersion() { return RestUtils.call(() -> RuntimeConstants.VERSION, ServerConfiguration.global()); }
/** * @summary get the service version * @return the response object */ @GET @Path(SERVICE_VERSION) @ReturnType("java.lang.Long") public Response getServiceVersion() { return RestUtils.call(() -> Constants.BLOCK_MASTER_CLIENT_SERVICE_VERSION, ServerConfiguration.global()); }
/** * @summary set the Alluxio log information * @param logName the log's name * @param level the log level * @return the response object */ @POST @Path(LOG_LEVEL) @ReturnType("alluxio.wire.LogInfo") public Response logLevel(@QueryParam(LOG_ARGUMENT_NAME) final String logName, @QueryParam(LOG_ARGUMENT_LEVEL) final String level) { return RestUtils.call(() -> LogUtils.setLogLevel(logName, level), ServerConfiguration.global()); } }
/** * @summary get the configuration map, the keys are ordered alphabetically. * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_CONFIGURATION) @ReturnType("java.util.SortedMap<java.lang.String, java.lang.String>") @Deprecated public Response getConfiguration() { return RestUtils.call(() -> getConfigurationInternal(true), ServerConfiguration.global()); }
/** * @summary get the total capacity of the worker in bytes * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_CAPACITY_BYTES) @ReturnType("java.lang.Long") @Deprecated public Response getCapacityBytes() { return RestUtils.call(() -> mStoreMeta.getCapacityBytes(), ServerConfiguration.global()); }
/** * @summary get the uptime of the master in milliseconds * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_UPTIME_MS) @ReturnType("java.lang.Long") @Deprecated public Response getUptimeMs() { return RestUtils.call(() -> mMasterProcess.getUptimeMs(), ServerConfiguration.global()); }
/** * @summary get the start time of the worker in milliseconds * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_START_TIME_MS) @ReturnType("java.lang.Long") @Deprecated public Response getStartTimeMs() { return RestUtils.call(() -> mWorkerProcess.getStartTimeMs(), ServerConfiguration.global()); }
/** * @summary get the worker metrics * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_METRICS) @ReturnType("java.util.SortedMap<java.lang.String, java.lang.Long>") @Deprecated public Response getMetrics() { return RestUtils.call(() -> getMetricsInternal(), ServerConfiguration.global()); }
/** * @summary get the total capacity of all workers in bytes * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_CAPACITY_BYTES) @ReturnType("java.lang.Long") @Deprecated public Response getCapacityBytes() { return RestUtils.call(() -> mBlockMaster.getCapacityBytes(), ServerConfiguration.global()); }
/** * @summary get the count of workers * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_WORKER_COUNT) @ReturnType("java.lang.Integer") @Deprecated public Response getWorkerCount() { return RestUtils.call(() -> mBlockMaster.getWorkerCount(), ServerConfiguration.global()); }
/** * @summary get the list of worker descriptors * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_WORKER_INFO_LIST) @ReturnType("java.util.List<alluxio.wire.WorkerInfo>") @Deprecated public Response getWorkerInfoList() { return RestUtils.call(() -> mBlockMaster.getWorkerInfoList(), ServerConfiguration.global()); }
/** * @summary get the uptime of the worker in milliseconds * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_UPTIME_MS) @ReturnType("java.lang.Long") @Deprecated public Response getUptimeMs() { return RestUtils.call(() -> mWorkerProcess.getUptimeMs(), ServerConfiguration.global()); }
/** * @summary get the configuration map, the keys are ordered alphabetically. * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_CONFIGURATION) @ReturnType("java.util.SortedMap<java.lang.String, java.lang.String>") @Deprecated public Response getConfiguration() { return RestUtils.call(() -> getConfigurationInternal(true), ServerConfiguration.global()); }
/** * @summary get the start time of the master in milliseconds * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_START_TIME_MS) @ReturnType("java.lang.Long") @Deprecated public Response getStartTimeMs() { return RestUtils.call(() -> mMasterProcess.getStartTimeMs(), ServerConfiguration.global()); }
/** * @summary get the used capacity * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_USED_BYTES) @ReturnType("java.lang.Long") @Deprecated public Response getUsedBytes() { return RestUtils.call(() -> mBlockMaster.getUsedBytes(), ServerConfiguration.global()); }
/** * @summary get the used disk capacity, a negative value means the capacity is unknown. * @return the response object * @deprecated since version 1.4 and will be removed in version 2.0 * @see #getInfo(Boolean) */ @GET @Path(GET_UFS_USED_BYTES) @ReturnType("java.lang.Long") @Deprecated public Response getUfsUsedBytes() { return RestUtils.call(() -> getUfsCapacityInternal().getUsed(), ServerConfiguration.global()); }