public static String getCdapHBaseCompatVersion() { // cdap hbase compat module return HBaseVersion.get().toString(); }
/** * Prints out the HBase {@link Version} enum value for the current version of HBase on the classpath. */ public static void main(String[] args) { // Suppress any output to stdout PrintStream stdout = System.out; System.setOut(new PrintStream(new NullOutputStream())); Version version = HBaseVersion.get(); // Restore stdout System.setOut(stdout); System.out.println(version.getMajorVersion()); if (args.length == 1 && "-v".equals(args[0])) { // Print versionString if verbose System.out.println("versionString=" + getVersionString()); } }
/** * Prints out the HBase {@link Version} enum value for the current version of HBase on the classpath. */ public static void main(String[] args) { // Suppress any output to stdout PrintStream stdout = System.out; System.setOut(new PrintStream(new NullOutputStream())); Version version = HBaseVersion.get(); // Restore stdout System.setOut(stdout); System.out.println(version.getMajorVersion()); if (args.length == 1 && "-v".equals(args[0])) { // Print versionString if verbose System.out.println("versionString=" + getVersionString()); } }
private String getCoprocessorName() { ProjectInfo.Version cdapVersion = ProjectInfo.getVersion(); StringBuilder name = new StringBuilder() .append("coprocessor-") .append(cdapVersion.getMajor()).append('.') .append(cdapVersion.getMinor()).append('.') .append(cdapVersion.getFix()); if (cdapVersion.isSnapshot()) { name.append("-SNAPSHOT"); } if (includeBuildInPath) { name.append("-").append(cdapVersion.getBuildTime()); } name.append("-").append(HBaseVersion.get()).append(".jar"); return name.toString(); } }
builder.append(Constants.Startup.TX_PRUNE_ACL_CHECK); builder.append(" in cdap-site.xml."); if (HBaseVersion.get().equals(HBaseVersion.Version.HBASE_96) || HBaseVersion.get().equals(HBaseVersion.Version.HBASE_98)) { builder.append(" Detected HBase version "); builder.append(HBaseVersion.get()); builder.append(" CDAP will not be able determine if it has global admin privilege in HBase."); builder.append(" After granting global admin privilege please set ");
public static void setHBaseVersion(HTableDescriptorBuilder tableDescriptorBuilder) { tableDescriptorBuilder.setValue(CDAP_HBASE_VERSION, HBaseVersion.get().getMajorVersion()); }
cConf.get(Constants.HBase.HBASE_VERSION_RESOLUTION_STRATEGY)); try { HBaseVersion.Version hbaseVersion = HBaseVersion.get(); switch (hbaseVersion) { case HBASE_94:
private String getCoprocessorName() { ProjectInfo.Version cdapVersion = ProjectInfo.getVersion(); StringBuilder name = new StringBuilder() .append("coprocessor-") .append(cdapVersion.getMajor()).append('.') .append(cdapVersion.getMinor()).append('.') .append(cdapVersion.getFix()); if (cdapVersion.isSnapshot()) { name.append("-SNAPSHOT"); } if (includeBuildInPath) { name.append("-").append(cdapVersion.getBuildTime()); } name.append("-").append(HBaseVersion.get()).append(".jar"); return name.toString(); } }
cConf.get(Constants.HBase.HBASE_VERSION_RESOLUTION_STRATEGY)); try { HBaseVersion.Version hbaseVersion = HBaseVersion.get(); switch (hbaseVersion) { case HBASE_94:
public static void setHBaseVersion(HTableDescriptorBuilder tableDescriptorBuilder) { tableDescriptorBuilder.setValue(CDAP_HBASE_VERSION, HBaseVersion.get().getMajorVersion()); }
/** * Get {@link TableDescriptorBuilder} with default properties set. * @param tableId id of the table for which the descriptor is to be returned * @param cConf the instance of the {@link CConfiguration} * @return the builder with default properties set */ public static TableDescriptorBuilder getTableDescriptorBuilder(TableId tableId, CConfiguration cConf) { String tablePrefix = cConf.get(Constants.Dataset.TABLE_PREFIX); TableName tableName = HTableNameConverter.toTableName(tablePrefix, tableId); TableDescriptorBuilder tdBuilder = new TableDescriptorBuilder(tableName.getNamespaceAsString(), tableName.getQualifierAsString()); tdBuilder .addProperty(Constants.Dataset.TABLE_PREFIX, tablePrefix) .addProperty(HBaseTableUtil.CDAP_VERSION, ProjectInfo.getVersion().toString()) .addProperty(HBaseTableUtil.CDAP_HBASE_VERSION, HBaseVersion.get().getMajorVersion()); return tdBuilder; }
/** * Get {@link TableDescriptorBuilder} with default properties set. * @param tableId id of the table for which the descriptor is to be returned * @param cConf the instance of the {@link CConfiguration} * @return the builder with default properties set */ public static TableDescriptorBuilder getTableDescriptorBuilder(TableId tableId, CConfiguration cConf) { String tablePrefix = cConf.get(Constants.Dataset.TABLE_PREFIX); TableName tableName = HTableNameConverter.toTableName(tablePrefix, tableId); TableDescriptorBuilder tdBuilder = new TableDescriptorBuilder(tableName.getNamespaceAsString(), tableName.getQualifierAsString()); tdBuilder .addProperty(Constants.Dataset.TABLE_PREFIX, tablePrefix) .addProperty(HBaseTableUtil.CDAP_VERSION, ProjectInfo.getVersion().toString()) .addProperty(HBaseTableUtil.CDAP_HBASE_VERSION, HBaseVersion.get().getMajorVersion()); return tdBuilder; }