Package org.kiji.schema.util

Examples of org.kiji.schema.util.ProtocolVersion.compareTo()


    conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, uri.getZookeeperClientPort());

    LOG.info(String.format("Removing the kiji instance '%s'.", uri.getInstance()));

    final ProtocolVersion systemVersion = getSystemVersion(uri, conf, htableFactory);
    if (systemVersion.compareTo(Versions.SYSTEM_2_0) < 0) {
      uninstallSystem_1_0(uri, conf, adminFactory);
    } else if (systemVersion.compareTo(Versions.SYSTEM_2_0) == 0) {
      uninstallSystem_2_0(uri, conf, adminFactory);
    } else {
      throw new InternalKijiError(String.format("Unknown System version %s.", systemVersion));
View Full Code Here


    LOG.info(String.format("Removing the kiji instance '%s'.", uri.getInstance()));

    final ProtocolVersion systemVersion = getSystemVersion(uri, conf, htableFactory);
    if (systemVersion.compareTo(Versions.SYSTEM_2_0) < 0) {
      uninstallSystem_1_0(uri, conf, adminFactory);
    } else if (systemVersion.compareTo(Versions.SYSTEM_2_0) == 0) {
      uninstallSystem_2_0(uri, conf, adminFactory);
    } else {
      throw new InternalKijiError(String.format("Unknown System version %s.", systemVersion));
    }
View Full Code Here

  private void ensureValidationCompatibility(TableLayoutDesc layout) throws IOException {
    final ProtocolVersion layoutVersion = ProtocolVersion.parse(layout.getVersion());
    final ProtocolVersion systemVersion = getSystemTable().getDataVersion();

    if ((layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) >= 0)
        && (systemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) < 0)) {
      throw new InvalidLayoutException(
          String.format("Layout version: %s not supported by system version: %s",
              layoutVersion, systemVersion));
    }
  }
View Full Code Here

  private void ensureValidationCompatibility(TableLayoutDesc layout) throws IOException {
    final ProtocolVersion layoutVersion = ProtocolVersion.parse(layout.getVersion());
    final ProtocolVersion systemVersion = getSystemTable().getDataVersion();

    if ((layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) >= 0)
        && (systemVersion.compareTo(Versions.MIN_SYS_VER_FOR_LAYOUT_VALIDATION) < 0)) {
      throw new InvalidLayoutException(
          String.format("Layout version: %s not supported by system version: %s",
              layoutVersion, systemVersion));
    }
  }
View Full Code Here

   */
  public void validate(KijiTableLayout reference, KijiTableLayout layout) throws IOException {

    final ProtocolVersion layoutVersion = ProtocolVersion.parse(layout.getDesc().getVersion());

    if (layoutVersion.compareTo(Versions.LAYOUT_VALIDATION_VERSION) < 0) {
      // Layout versions older than layout-1.3.0 do not require validation
      return;
    }

    // Accumulator for error messages which will be used to create an exception if errors occur.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.