Package org.kiji.schema.KijiSchemaTable

Examples of org.kiji.schema.KijiSchemaTable.SchemaEntry


   */
  private int lookupSchema() throws IOException {
    final KijiSchemaTable table = mKiji.getSchemaTable();
    final File file = new File(mLookupFlag);
    final Schema schema = new Schema.Parser().parse(file);
    final SchemaEntry sEntry = table.getSchemaEntry(schema);
    final long id = sEntry.getId();
    final BytesKey hash = sEntry.getHash();
    if (isInteractive()) {
      getPrintStream().print("Schema ID for the given schema is: ");
    }
    getPrintStream().println(id);
    if (isInteractive()) {
View Full Code Here


   * @throws IOException in case of an error.
   */
  private int getByHash() throws IOException {
    final KijiSchemaTable table = mKiji.getSchemaTable();
    final BytesKey bytesKey = new BytesKey(ByteArrayFormatter.parseHex(mGetByHashFlag, ':'));
    final SchemaEntry sEntry = table.getSchemaEntry(bytesKey);
    final Schema schema = sEntry.getSchema();

    if (isInteractive()) {
      getPrintStream().print("Schema ID for the given schema is: ");
    }
    getPrintStream().println(sEntry.getId());
    if (mOutputFlag != null && !mOutputFlag.isEmpty()) {
      // Attempt to write the definition to the output file.
      try {
        if (writeDefinitionToFile(schema)) {
          if (isInteractive()) {
View Full Code Here

TOP

Related Classes of org.kiji.schema.KijiSchemaTable.SchemaEntry

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.