Examples of AbstractHBaseDataSetAdmin


Examples of co.cask.cdap.data2.dataset2.lib.hbase.AbstractHBaseDataSetAdmin

      if (namespace.fromNamespaced(tableName) != null) {
        System.out.println(String.format("Upgrading hbase table: %s, desc: %s", tableName, desc.toString()));

        final boolean supportsIncrement =
          "true".equalsIgnoreCase(desc.getValue(OrderedTable.PROPERTY_READLESS_INCREMENT));
        DatasetAdmin admin = new AbstractHBaseDataSetAdmin(tableName, hConf, hBaseTableUtil) {
          @Override
          protected CoprocessorJar createCoprocessorJar() throws IOException {
            return HBaseOrderedTableAdmin.createCoprocessorJarInternal(cConf,
                                                                       injector.getInstance(LocationFactory.class),
                                                                       hBaseTableUtil,
                                                                       supportsIncrement);
          }

          @Override
          protected boolean upgradeTable(HTableDescriptor tableDescriptor) {
            // we don't do any other changes apart from coprocessors upgrade
            return false;
          }

          @Override
          public void create() throws IOException {
            // no-op
            throw new UnsupportedOperationException("This DatasetAdmin is only used for upgrade() operation");
          }
        };
        admin.upgrade();
        System.out.println(String.format("Upgraded hbase table: %s", tableName));
      }
    }
  }
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.hbase.AbstractHBaseDataSetAdmin

  @Override
  public void upgrade(String name, Properties properties) throws Exception {
    QueueName queueName = QueueName.from(URI.create(name));
    String hBaseTableName = getActualTableName(queueName);
    AbstractHBaseDataSetAdmin dsAdmin = new DatasetAdmin(hBaseTableName, hConf, tableUtil);
    try {
      dsAdmin.upgrade();
    } finally {
      dsAdmin.close();
    }
  }
View Full Code Here

Examples of co.cask.cdap.data2.dataset2.lib.hbase.AbstractHBaseDataSetAdmin

    // Create the config table first so that in case the queue table coprocessor runs, it can access the config table.
    createConfigTable();

    String hBaseTableName = getActualTableName(queueName);
    AbstractHBaseDataSetAdmin dsAdmin = new DatasetAdmin(hBaseTableName, hConf, tableUtil);
    try {
      dsAdmin.create();
    } finally {
      dsAdmin.close();
    }
  }
View Full Code Here

Examples of co.cask.tigon.data.lib.hbase.AbstractHBaseDataSetAdmin

  @Override
  public void upgrade(String name, Properties properties) throws Exception {
    QueueName queueName = QueueName.from(URI.create(name));
    String hBaseTableName = getActualTableName(queueName);
    AbstractHBaseDataSetAdmin dsAdmin = new DatasetAdmin(hBaseTableName, hConf, tableUtil);
    try {
      dsAdmin.upgrade();
    } finally {
      dsAdmin.close();
    }
  }
View Full Code Here

Examples of co.cask.tigon.data.lib.hbase.AbstractHBaseDataSetAdmin

    // Create the config table first so that in case the queue table coprocessor runs, it can access the config table.
    createConfigTable();

    String hBaseTableName = getActualTableName(queueName);
    AbstractHBaseDataSetAdmin dsAdmin = new DatasetAdmin(hBaseTableName, hConf, tableUtil);
    try {
      dsAdmin.create();
    } finally {
      dsAdmin.close();
    }
  }
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.