congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ConfigCheckReport
Code IndexAdd Tabnine to your IDE (free)

How to use
ConfigCheckReport
in
alluxio.wire

Best Java code snippets using alluxio.wire.ConfigCheckReport (Showing top 15 results out of 315)

origin: Alluxio/alluxio

/**
 * Logs the configuration check report information.
 */
public synchronized void logConfigReport() {
 ConfigStatus reportStatus = mConfigCheckReport.getConfigStatus();
 if (reportStatus.equals(ConfigStatus.PASSED)) {
  LOG.info(CONSISTENT_CONFIGURATION_INFO);
 } else if (reportStatus.equals(ConfigStatus.WARN)) {
  LOG.warn("{}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
    mConfigCheckReport.getConfigWarns().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
 } else {
  LOG.error("{}\nErrors: {}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
    mConfigCheckReport.getConfigErrors().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")),
    mConfigCheckReport.getConfigWarns().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
 }
}
origin: Alluxio/alluxio

  ? ConfigStatus.WARN : ConfigStatus.PASSED;
if (!status.equals(mConfigCheckReport.getConfigStatus())) {
 logConfigReport();
mConfigCheckReport = new ConfigCheckReport(confErrors, confWarns, status);
origin: Alluxio/alluxio

@Override
public ConfigCheckReport getConfigReport() throws IOException {
 return retryRPC(() -> ConfigCheckReport.fromProto(
   mClient.getConfigReport(GetConfigReportPOptions.getDefaultInstance()).getReport()));
}
origin: Alluxio/alluxio

/**
 * Creates a new instance of {@link ConfigCheckReport} from proto representation.
 *
 * @param report the proto representation of a configuration check report
 * @return the instance
 */
public static ConfigCheckReport fromProto(alluxio.grpc.ConfigCheckReport report) {
 return new ConfigCheckReport(report);
}
origin: Alluxio/alluxio

@Override
public void getConfigReport(GetConfigReportPOptions options,
  StreamObserver<GetConfigReportPResponse> responseObserver) {
 RpcUtils.call(LOG,
   (RpcUtils.RpcCallableThrowsIOException<GetConfigReportPResponse>) () -> {
    return GetConfigReportPResponse.newBuilder()
      .setReport(mMetaMaster.getConfigCheckReport().toProto()).build();
   }, "getConfigReport", "options=%s", responseObserver, options);
}
origin: org.alluxio/alluxio-core-server-master

@Override
public GetConfigReportTResponse getConfigReport(final GetConfigReportTOptions options)
  throws TException {
 return RpcUtils
   .call((RpcUtils.RpcCallable<GetConfigReportTResponse>) () -> new GetConfigReportTResponse(
     mMetaMaster.getConfigCheckReport().toThrift()));
}
origin: Alluxio/alluxio

/**
 * Constructs a new {@link ServerConfigurationChecker}.
 *
 * @param masterStore master configuration store
 * @param workerStore worker configuration store
 */
public ServerConfigurationChecker(ServerConfigurationStore masterStore,
  ServerConfigurationStore workerStore) {
 mMasterStore = masterStore;
 mWorkerStore = workerStore;
 mConfigCheckReport = new ConfigCheckReport();
 mMasterStore.registerChangeListener(() -> mConfigDirty = true);
 mWorkerStore.registerChangeListener(() -> mConfigDirty = true);
}
origin: Alluxio/alluxio

/**
 * Runs doctor configuration command.
 *
 * @return 0 on success, 1 otherwise
 */
public int run() throws IOException {
 ConfigCheckReport report = mMetaMasterClient.getConfigReport();
 ConfigStatus configStatus = report.getConfigStatus();
 if (configStatus == ConfigStatus.PASSED) {
  // No errors or warnings to show
  mPrintStream.println("No server-side configuration errors or warnings.");
  return 0;
 }
 Map<Scope, List<InconsistentProperty>> errors = report.getConfigErrors();
 if (errors.size() != 0) {
  mPrintStream.println("Server-side configuration errors "
    + "(those properties are required to be identical): ");
  printInconsistentProperties(errors);
 }
 Map<Scope, List<InconsistentProperty>> warnings = report.getConfigWarns();
 if (warnings.size() != 0) {
  mPrintStream.println("\nServer-side configuration warnings "
    + "(those properties are recommended to be identical): ");
  printInconsistentProperties(warnings);
 }
 return 0;
}
origin: org.alluxio/alluxio-core-server-master

  ? ConfigStatus.WARN : ConfigStatus.PASSED;
if (!status.equals(mConfigCheckReport.getConfigStatus())) {
 logConfigReport();
mConfigCheckReport = new ConfigCheckReport(confErrors, confWarns, status);
origin: org.alluxio/alluxio-core-common

/**
 * Creates a new instance of {@link ConfigCheckReport} from thrift representation.
 *
 * @param report the thrift representation of a configuration check report
 * @return the instance
 */
public static ConfigCheckReport fromThrift(alluxio.thrift.ConfigCheckReport report) {
 return new ConfigCheckReport(report);
}
origin: Alluxio/alluxio

 /**
  * Checks if the server-side configuration report is as expected.
  *
  * @param expectedErrorNum the expected error number
  * @param expectedWarnNum the expected warning number
  * @param expectedStatus the expected config check status
  */
 private void checkResults(int expectedErrorNum, int expectedWarnNum,
   ConfigStatus expectedStatus) {
  mConfigChecker.regenerateReport();
  ConfigCheckReport report = mConfigChecker.getConfigCheckReport();
  assertEquals(expectedErrorNum, report.getConfigErrors().size());
  assertEquals(expectedWarnNum, report.getConfigWarns().size());
  assertEquals(expectedStatus, report.getConfigStatus());
 }
}
origin: org.alluxio/alluxio-core-server-master

/**
 * Constructs a new {@link ServerConfigurationChecker}.
 *
 * @param masterStore master configuration store
 * @param workerStore worker configuration store
 */
public ServerConfigurationChecker(ServerConfigurationStore masterStore,
  ServerConfigurationStore workerStore) {
 mMasterStore = masterStore;
 mWorkerStore = workerStore;
 mConfigCheckReport = new ConfigCheckReport();
 mMasterStore.registerChangeListener(() -> mConfigDirty = true);
 mWorkerStore.registerChangeListener(() -> mConfigDirty = true);
}
origin: Alluxio/alluxio

response.setConfigCheckStatus(report.getConfigStatus())
  .setConfigCheckErrors(report.getConfigErrors())
  .setConfigCheckWarns(report.getConfigWarns()).setConfigCheckErrorNum(
  report.getConfigErrors().values().stream().mapToInt(List::size).sum())
  .setConfigCheckWarnNum(
    report.getConfigWarns().values().stream().mapToInt(List::size).sum());
origin: org.alluxio/alluxio-core-server-master

/**
 * Logs the configuration check report information.
 */
public synchronized void logConfigReport() {
 ConfigStatus reportStatus = mConfigCheckReport.getConfigStatus();
 if (reportStatus.equals(ConfigStatus.PASSED)) {
  LOG.info(CONSISTENT_CONFIGURATION_INFO);
 } else if (reportStatus.equals(ConfigStatus.WARN)) {
  LOG.warn("{}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
    mConfigCheckReport.getConfigWarns().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
 } else {
  LOG.error("{}\nErrors: {}\nWarnings: {}", INCONSISTENT_CONFIGURATION_INFO,
    mConfigCheckReport.getConfigErrors().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")),
    mConfigCheckReport.getConfigWarns().values().stream()
      .map(Object::toString).limit(LOG_CONF_SIZE).collect(Collectors.joining(", ")));
 }
}
origin: org.alluxio/alluxio-core-server-master

request.setAttribute("configCheckStatus", report.getConfigStatus());
request.setAttribute("configCheckErrors", report.getConfigErrors());
request.setAttribute("configCheckWarns", report.getConfigWarns());
request.setAttribute("configCheckErrorNum",
  report.getConfigErrors().values().stream().mapToInt(List::size).sum());
request.setAttribute("configCheckWarnNum",
  report.getConfigWarns().values().stream().mapToInt(List::size).sum());
alluxio.wireConfigCheckReport

Javadoc

Represents a configuration report which records the configuration checker results. Since we check server-side configuration, Scope here only includes SERVER, MASTER and WORKER. Scope.ALL will be considered as Scope.SERVER.

Most used methods

  • getConfigErrors
  • getConfigStatus
  • getConfigWarns
  • <init>
    Creates a new instance of ConfigCheckReport.
  • fromProto
    Creates a new instance of ConfigCheckReport from proto representation.
  • toProto
  • toThrift

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top PhpStorm plugins
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