org.apache.hadoop.hbase.TableName.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(192)

本文整理了Java中org.apache.hadoop.hbase.TableName.<init>()方法的一些代码示例,展示了TableName.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableName.<init>()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.TableName
类名称:TableName
方法名:<init>

TableName.<init>介绍

[英]This is only for the old and meta tables.
[中]这只适用于旧表和元表。

代码示例

代码示例来源:origin: apache/hbase

/**
 * It is used to create table names for old META, and ROOT table.
 * These tables are not really legal tables. They are not added into the cache.
 * @return a dummy TableName instance (with no validation) for the passed qualifier
 */
private static TableName getADummyTableName(String qualifier) {
 return new TableName(qualifier);
}

代码示例来源:origin: apache/hbase

/**
 * Check that the object does not exist already. There are two reasons for creating the objects
 * only once:
 * 1) With 100K regions, the table names take ~20MB.
 * 2) Equals becomes much faster as it's resolved with a reference and an int comparison.
 */
private static TableName createTableNameIfNecessary(ByteBuffer bns, ByteBuffer qns) {
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 TableName newTable = new TableName(bns, qns);
 if (tableCache.add(newTable)) {  // Adds the specified element if it is not already present
  return newTable;
 }
 // Someone else added it. Let's find it.
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 // this should never happen.
 throw new IllegalStateException(newTable + " was supposed to be in the cache");
}

代码示例来源:origin: com.aliyun.hbase/alihbase-common

/**
 * It is used to create table names for old META, and ROOT table.
 * These tables are not really legal tables. They are not added into the cache.
 * @return a dummy TableName instance (with no validation) for the passed qualifier
 */
private static TableName getADummyTableName(String qualifier) {
 return new TableName(qualifier);
}

代码示例来源:origin: org.apache.hbase/hbase-common

/**
 * It is used to create table names for old META, and ROOT table.
 * These tables are not really legal tables. They are not added into the cache.
 * @return a dummy TableName instance (with no validation) for the passed qualifier
 */
private static TableName getADummyTableName(String qualifier) {
 return new TableName(qualifier);
}

代码示例来源:origin: harbby/presto-connectors

/**
 * It is used to create table names for old META, and ROOT table.
 * These tables are not really legal tables. They are not added into the cache.
 * @return a dummy TableName instance (with no validation) for the passed qualifier
 */
private static TableName getADummyTableName(String qualifier) {
 return new TableName(qualifier);
}

代码示例来源:origin: stackoverflow.com

TableName papa = new TableName();
papa.setParent(null); // parent

  TableName kid1 = new TableName();
  kid1.setParent(papa);
  papa.getChildren().add(kid1);

    TableName kid1_1 = new TableName();
    kid1_1.setParent(kid1);
    kid1.getChildren().add(kid1_1);

  TableName kid2 = new TableName();
  kid2.setParent(papa);
  papa.getChildren().add(kid2);

session.save(papa)

代码示例来源:origin: harbby/presto-connectors

/**
 * Check that the object does not exist already. There are two reasons for creating the objects
 * only once:
 * 1) With 100K regions, the table names take ~20MB.
 * 2) Equals becomes much faster as it's resolved with a reference and an int comparison.
 */
private static TableName createTableNameIfNecessary(ByteBuffer bns, ByteBuffer qns) {
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 TableName newTable = new TableName(bns, qns);
 if (tableCache.add(newTable)) {  // Adds the specified element if it is not already present
  return newTable;
 }
 // Someone else added it. Let's find it.
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 // this should never happen.
 throw new IllegalStateException(newTable + " was supposed to be in the cache");
}

代码示例来源:origin: org.apache.hbase/hbase-common

/**
 * Check that the object does not exist already. There are two reasons for creating the objects
 * only once:
 * 1) With 100K regions, the table names take ~20MB.
 * 2) Equals becomes much faster as it's resolved with a reference and an int comparison.
 */
private static TableName createTableNameIfNecessary(ByteBuffer bns, ByteBuffer qns) {
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 TableName newTable = new TableName(bns, qns);
 if (tableCache.add(newTable)) {  // Adds the specified element if it is not already present
  return newTable;
 }
 // Someone else added it. Let's find it.
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 // this should never happen.
 throw new IllegalStateException(newTable + " was supposed to be in the cache");
}

代码示例来源:origin: com.aliyun.hbase/alihbase-common

/**
 * Check that the object does not exist already. There are two reasons for creating the objects
 * only once:
 * 1) With 100K regions, the table names take ~20MB.
 * 2) Equals becomes much faster as it's resolved with a reference and an int comparison.
 */
private static TableName createTableNameIfNecessary(ByteBuffer bns, ByteBuffer qns) {
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 TableName newTable = new TableName(bns, qns);
 if (tableCache.add(newTable)) {  // Adds the specified element if it is not already present
  return newTable;
 }
 // Someone else added it. Let's find it.
 for (TableName tn : tableCache) {
  if (Bytes.equals(tn.getQualifier(), qns) && Bytes.equals(tn.getNamespace(), bns)) {
   return tn;
  }
 }
 // this should never happen.
 throw new IllegalStateException(newTable + " was supposed to be in the cache");
}

相关文章