Tabnine Logo
IncorrectVersionException.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.apache.hadoop.hdfs.server.common.IncorrectVersionException

Best Java code snippets using org.apache.hadoop.hdfs.server.common.IncorrectVersionException.toString (Showing top 3 results out of 315)

origin: org.apache.hadoop/hadoop-hdfs

private void verifySoftwareVersion(DatanodeRegistration dnReg)
  throws IncorrectVersionException {
 String dnVersion = dnReg.getSoftwareVersion();
 if (VersionUtil.compareVersions(dnVersion, minimumDataNodeVersion) < 0) {
  IncorrectVersionException ive = new IncorrectVersionException(
    minimumDataNodeVersion, dnVersion, "DataNode", "NameNode");
  LOG.warn(ive.getMessage() + " DN: " + dnReg);
  throw ive;
 }
 String nnVersion = VersionInfo.getVersion();
 if (!dnVersion.equals(nnVersion)) {
  String messagePrefix = "Reported DataNode version '" + dnVersion +
    "' of DN " + dnReg + " does not match NameNode version '" +
    nnVersion + "'";
  long nnCTime = nn.getFSImage().getStorage().getCTime();
  long dnCTime = dnReg.getStorageInfo().getCTime();
  if (nnCTime != dnCTime) {
   IncorrectVersionException ive = new IncorrectVersionException(
     messagePrefix + " and CTime of DN ('" + dnCTime +
     "') does not match CTime of NN ('" + nnCTime + "')");
   LOG.warn(ive.toString(), ive);
   throw ive;
  } else {
   LOG.info(messagePrefix +
     ". Note: This is normal during a rolling upgrade.");
  }
 }
}
origin: ch.cern.hadoop/hadoop-hdfs

private void verifySoftwareVersion(DatanodeRegistration dnReg)
  throws IncorrectVersionException {
 String dnVersion = dnReg.getSoftwareVersion();
 if (VersionUtil.compareVersions(dnVersion, minimumDataNodeVersion) < 0) {
  IncorrectVersionException ive = new IncorrectVersionException(
    minimumDataNodeVersion, dnVersion, "DataNode", "NameNode");
  LOG.warn(ive.getMessage() + " DN: " + dnReg);
  throw ive;
 }
 String nnVersion = VersionInfo.getVersion();
 if (!dnVersion.equals(nnVersion)) {
  String messagePrefix = "Reported DataNode version '" + dnVersion +
    "' of DN " + dnReg + " does not match NameNode version '" +
    nnVersion + "'";
  long nnCTime = nn.getFSImage().getStorage().getCTime();
  long dnCTime = dnReg.getStorageInfo().getCTime();
  if (nnCTime != dnCTime) {
   IncorrectVersionException ive = new IncorrectVersionException(
     messagePrefix + " and CTime of DN ('" + dnCTime +
     "') does not match CTime of NN ('" + nnCTime + "')");
   LOG.warn(ive.toString(), ive);
   throw ive;
  } else {
   LOG.info(messagePrefix +
     ". Note: This is normal during a rolling upgrade.");
  }
 }
}
origin: io.prestosql.hadoop/hadoop-apache

private void verifySoftwareVersion(DatanodeRegistration dnReg)
  throws IncorrectVersionException {
 String dnVersion = dnReg.getSoftwareVersion();
 if (VersionUtil.compareVersions(dnVersion, minimumDataNodeVersion) < 0) {
  IncorrectVersionException ive = new IncorrectVersionException(
    minimumDataNodeVersion, dnVersion, "DataNode", "NameNode");
  LOG.warn(ive.getMessage() + " DN: " + dnReg);
  throw ive;
 }
 String nnVersion = VersionInfo.getVersion();
 if (!dnVersion.equals(nnVersion)) {
  String messagePrefix = "Reported DataNode version '" + dnVersion +
    "' of DN " + dnReg + " does not match NameNode version '" +
    nnVersion + "'";
  long nnCTime = nn.getFSImage().getStorage().getCTime();
  long dnCTime = dnReg.getStorageInfo().getCTime();
  if (nnCTime != dnCTime) {
   IncorrectVersionException ive = new IncorrectVersionException(
     messagePrefix + " and CTime of DN ('" + dnCTime +
     "') does not match CTime of NN ('" + nnCTime + "')");
   LOG.warn(ive.toString(), ive);
   throw ive;
  } else {
   LOG.info(messagePrefix +
     ". Note: This is normal during a rolling upgrade.");
  }
 }
}
org.apache.hadoop.hdfs.server.commonIncorrectVersionExceptiontoString

Popular methods of IncorrectVersionException

  • <init>
  • getMessage

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JFrame (javax.swing)
  • 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