Package org.kiji.schema

Examples of org.kiji.schema.InternalKijiError


    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));
    }

    LOG.info("Removed kiji instance '{}'.", uri.getInstance());
  }
View Full Code Here


              mColumnTranslator.toKijiColumnName(
                  new HBaseColumnName(keyValue.getFamily(), keyValue.getQualifier()));
        } catch (NoSuchColumnException e) {
          mLastQualifier = null;
          mLastColumn = null;
          throw new InternalKijiError(e);
        }
      }

      try {
        final DecodedCell<T> decodedCell = mCellDecoder.decodeCell(keyValue.getValue());
View Full Code Here

        final CuratorFramework zkConnection =
            ZooKeeperUtils.getZooKeeperClient(ZK_CLUSTER.getConnectString());
        DebugResourceTracker.get().unregisterResource(zkConnection);
      }
    } catch (Exception e) {
      throw new InternalKijiError(e);
    }
  }
View Full Code Here

        try {
          usersTracker.start();
          final String currentLayoutId = mLayoutUpdateHandler.getCurrentLayoutId();
          LOG.info("Table {} has current layout ID {}.", mTableURI, currentLayoutId);
          if (!Objects.equal(currentLayoutId, currentLayout.getDesc().getLayoutId())) {
            throw new InternalKijiError(String.format(
                "Inconsistency between meta-table and ZooKeeper: "
                + "meta-table layout has ID %s while ZooKeeper has layout ID %s.",
                currentLayout.getDesc().getLayoutId(), currentLayoutId));
          }

          final String consistentLayoutId = waitForConsistentView();
          if ((consistentLayoutId != null) && !Objects.equal(consistentLayoutId, currentLayoutId)) {
            throw new InternalKijiError(String.format(
                "Consistent layout ID %s does not match current layout %s for table %s.",
                consistentLayoutId, currentLayout, mTableURI));
          }

          writeMetaTable(update);
View Full Code Here

    if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) < 0) {
      deleteTableSystem_1_0(tableName);
    } else if (mSystemVersion.compareTo(Versions.SYSTEM_2_0) == 0) {
      deleteTableSystem_2_0(tableName);
    } else {
      throw new InternalKijiError(String.format("Unknown System version %s.", mSystemVersion));
    }
  }
View Full Code Here

      // is a new URI, for example "family:column".
      URI uri = new URI(toString()).resolve(String.format("./%s", path));
      return newBuilder(uri.toString()).build();
    } catch (URISyntaxException e) {
      // This should never happen
      throw new InternalKijiError(String.format("KijiURI was incorrectly constructed: %s.", this));
    } catch (IllegalArgumentException e) {
      throw new KijiURIException(this.toString(),
          String.format("Path can not be resolved: %s", path));
    }
  }
View Full Code Here

  private static SchemaDecoder createSchemaDecoder(CellSpec cellSpec) throws IOException {
    switch (cellSpec.getCellSchema().getStorage()) {
      case HASH: return new SchemaHashDecoder(cellSpec.getSchemaTable());
      case UID: return new SchemaIdDecoder(cellSpec.getSchemaTable());
      case FINAL: return new FinalSchemaDecoder(cellSpec.getAvroSchema());
      default: throw new InternalKijiError(
            "Unexpected cell storage in cell schema: " + cellSpec.getCellSchema());
    }
  }
View Full Code Here

          }
          case EXPLICIT: {
            return new FinalSchemaDecoder(spec.getColumnReaderSpec().getAvroReaderSchema());
          }
          default: {
            throw new InternalKijiError(
                "Unknown Avro reader schema type from reader spec: " + spec.getColumnReaderSpec());
          }
        }
      }
      default: {
        throw new InternalKijiError(
            "Unknown cell schema storage from CellSchema: " + cellSchema);
      }
    }
  }
View Full Code Here

            new SchemaTableAvroResolver(layout.getSchemaTable());
        return resolver.apply(cellSchema.getDefaultReader());
      }
      case EXPLICIT: return spec.getColumnReaderSpec().getAvroReaderSchema();
      case WRITER: return null;
      default: throw new InternalKijiError(
          "Unknown AvroReaderSchemaType: " + spec.getColumnReaderSpec().getAvroReaderSchemaType());
    }
  }
View Full Code Here

      return String.format("%s" + ZK_NODE_NAME_SEPARATOR + "%s",
          URLEncoder.encode(userId, Charsets.UTF_8.displayName()),
          URLEncoder.encode(value, Charsets.UTF_8.displayName()));
    } catch (UnsupportedEncodingException e) {
      // this should never happen
      throw new InternalKijiError(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.kiji.schema.InternalKijiError

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.