Package org.apache.hadoop.hdfs.server.common

Examples of org.apache.hadoop.hdfs.server.common.IncorrectVersionException


      throws IncorrectVersionException {
    // build and layout versions should match
    String nnVersion = nsInfo.getSoftwareVersion();
    String minimumNameNodeVersion = dnConf.getMinimumNameNodeVersion();
    if (VersionUtil.compareVersions(nnVersion, minimumNameNodeVersion) < 0) {
      IncorrectVersionException ive = new IncorrectVersionException(
          minimumNameNodeVersion, nnVersion, "NameNode", "DataNode");
      LOG.warn(ive.getMessage());
      throw ive;
    }
    String dnVersion = VersionInfo.getVersion();
    if (!nnVersion.equals(dnVersion)) {
      LOG.info("Reported NameNode version '" + nnVersion + "' does not match " +
View Full Code Here


   * @param version
   * @throws IOException
   */
  void verifyVersion(int version) throws IOException {
    if (version != HdfsConstants.LAYOUT_VERSION)
      throw new IncorrectVersionException(version, "data node");
  }
View Full Code Here

   * @throws IncorrectVersionException
   */
  public void verifyVersion(int reportedVersion,
      int expectedVersion, String annotation) throws IOException {
    if (reportedVersion != expectedVersion)
      throw new IncorrectVersionException(
          reportedVersion, "data node " + annotation, expectedVersion);
  }
View Full Code Here

      // check if we have the same data transfer version as primary
      InjectionHandler.processEventIO(
          InjectionEvent.AVATARNODE_RECEIVED_DATA_TRANSFER_VERSION, primaryDataTransferVersion);
      int standbyDataTransferVersion = DataTransferProtocol.DATA_TRANSFER_VERSION;
      if (standbyDataTransferVersion != primaryDataTransferVersion && !startInfo.forceStartup) {
        throw new IncorrectVersionException(
            primaryDataTransferVersion, "data transfer", standbyDataTransferVersion);
      }
    }

    conf = setupAvatarNodeStorage(conf, startInfo, primaryNamenode);
View Full Code Here

          + ". No distributed upgrades are currently running on the NameNode");
      return null;
    }
    UpgradeObjectNamenode curUO = (UpgradeObjectNamenode)currentUpgrades.first();
    if(command.getVersion() != curUO.getVersion())
      throw new IncorrectVersionException(command.getVersion(),
          "UpgradeCommand", curUO.getVersion());
    UpgradeCommand reply = curUO.processUpgradeCommand(command);
    if(curUO.getUpgradeStatus() < 100) {
      return reply;
    }
View Full Code Here

          " different signs : " + reportedVersion + ", " + expectedVersion);
    }
    // layout_version is negative and data_transfer is positive, so we need to
    // look at the absolute.
    if (Math.abs(reportedVersion) < Math.abs(expectedVersion))
      throw new IncorrectVersionException(
          reportedVersion, "data node " + annotation, expectedVersion);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.common.IncorrectVersionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.