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

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

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

TableName.hashCode介绍

暂无

代码示例

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

@Override
 public int hashCode() {
  int result = m_tableName != null ? m_tableName.hashCode() : 0;
  result = 31 * result + Arrays.hashCode(m_startRow);
  result = 31 * result + Arrays.hashCode(m_endRow);
  result = 31 * result + (m_regionLocation != null ? m_regionLocation.hashCode() : 0);
  return result;
 }
}

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

@Override
 public int hashCode() {
  int result = tableName != null ? tableName.hashCode() : 0;
  result = 31 * result + (scan != null ? scan.hashCode() : 0);
  result = 31 * result + (startRow != null ? Arrays.hashCode(startRow) : 0);
  result = 31 * result + (endRow != null ? Arrays.hashCode(endRow) : 0);
  result = 31 * result + (regionLocation != null ? regionLocation.hashCode() : 0);
  result = 31 * result + (encodedRegionName != null ? encodedRegionName.hashCode() : 0);
  return result;
 }
}

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

/**
 * For performance reasons, the ordering is not lexicographic.
 */
@Override
public int compareTo(TableName tableName) {
 if (this == tableName) return 0;
 if (this.hashCode < tableName.hashCode()) {
  return -1;
 }
 if (this.hashCode > tableName.hashCode()) {
  return 1;
 }
 return this.nameAsString.compareTo(tableName.getNameAsString());
}

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

/**
 * @return hash code
 */
@Override
public int hashCode() {
 int result = this.name.hashCode();
 if (this.families.size() > 0) {
  for (ColumnFamilyDescriptor e : this.families.values()) {
   result ^= e.hashCode();
  }
 }
 result ^= values.hashCode();
 return result;
}

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

@Override
public int hashCode() {
 int result = (tableName != null ? tableName.hashCode() : 0);
 result = 31 * result + (state != null ? state.hashCode() : 0);
 return result;
}

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

@Override
public int hashCode() {
 int hash = 33 * this.getBackupId().hashCode() + type.hashCode();
 hash = 33 * hash + rootDir.hashCode();
 hash = 33 * hash + Long.valueOf(startTs).hashCode();
 hash = 33 * hash + Long.valueOf(completeTs).hashCode();
 for (TableName table : tableList) {
  hash = 33 * hash + table.hashCode();
 }
 return hash;
}

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

public void reportMobCompactionStart(TableName tableName) throws IOException {
 IdLock.Entry lockEntry = null;
 try {
  lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());
  AtomicInteger compactionsCount = mobCompactionStates.get(tableName);
  if (compactionsCount == null) {
   compactionsCount = new AtomicInteger(0);
   mobCompactionStates.put(tableName, compactionsCount);
  }
  compactionsCount.incrementAndGet();
 } finally {
  if (lockEntry != null) {
   mobCompactionLock.releaseLockEntry(lockEntry);
  }
 }
}

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

public void reportMobCompactionEnd(TableName tableName) throws IOException {
 IdLock.Entry lockEntry = null;
 try {
  lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());
  AtomicInteger compactionsCount = mobCompactionStates.get(tableName);
  if (compactionsCount != null) {
   int count = compactionsCount.decrementAndGet();
   // remove the entry if the count is 0.
   if (count == 0) {
    mobCompactionStates.remove(tableName);
   }
  }
 } finally {
  if (lockEntry != null) {
   mobCompactionLock.releaseLockEntry(lockEntry);
  }
 }
}

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

public MetricsTableSourceImpl(String tblName,
  MetricsTableAggregateSourceImpl aggregate, MetricsTableWrapperAggregate tblWrapperAgg) {
 LOG.debug("Creating new MetricsTableSourceImpl for table '{}'", tblName);
 this.tableName = TableName.valueOf(tblName);
 this.agg = aggregate;
 this.tableWrapperAgg = tblWrapperAgg;
 this.registry = agg.getMetricsRegistry();
 this.tableNamePrefix = "Namespace_" + this.tableName.getNamespaceAsString() +
   "_table_" + this.tableName.getQualifierAsString() + "_metric_";
 this.hashCode = this.tableName.hashCode();
}

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

@Override
 public int hashCode() {
  int hash = Arrays.hashCode(getRegionName());
  hash = (int) (hash ^ getRegionId());
  hash ^= Arrays.hashCode(getStartKey());
  hash ^= Arrays.hashCode(getEndKey());
  hash ^= Boolean.valueOf(isOffline()).hashCode();
  hash ^= getTable().hashCode();
  if (regionServer != null) {
   hash ^= regionServer.hashCode();
  }
  hash = (int) (hash ^ modTime);
  return hash;
 }
}

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

@Override
public int hashCode() {
 final int prime = 37;
 int result = super.hashCode();
 if (table != null) {
  result = prime * result + table.hashCode();
 }
 if (family != null) {
  result = prime * result + Bytes.hashCode(family);
 }
 if (qualifier != null) {
  result = prime * result + Bytes.hashCode(qualifier);
 }
 return result;
}

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

"\n");
final Random rand = new Random(tableName.hashCode() * 17L + 12938197137L);
final int numCF = families.size();
final byte[][] cfBytes = new byte[numCF][];

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

/**
 * @return hash code
 */
@Override
public int hashCode() {
 int result = this.name.hashCode();
 if (this.families.size() > 0) {
  for (ColumnFamilyDescriptor e : this.families.values()) {
   result ^= e.hashCode();
  }
 }
 result ^= values.hashCode();
 return result;
}

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

@Override
public int hashCode() {
 int result = (tableName != null ? tableName.hashCode() : 0);
 result = 31 * result + (state != null ? state.hashCode() : 0);
 return result;
}

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

@Override
public int hashCode() {
 final int prime = 37;
 int result = super.hashCode();
 if (table != null) {
  result = prime * result + table.hashCode();
 }
 if (family != null) {
  result = prime * result + Bytes.hashCode(family);
 }
 if (qualifier != null) {
  result = prime * result + Bytes.hashCode(qualifier);
 }
 if (namespace != null) {
  result = prime * result + namespace.hashCode();
 }
 return result;
}

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

@Override
 public int hashCode() {
  int result = m_tableName != null ? m_tableName.hashCode() : 0;
  result = 31 * result + Arrays.hashCode(m_startRow);
  result = 31 * result + Arrays.hashCode(m_endRow);
  result = 31 * result + (m_regionLocation != null ? m_regionLocation.hashCode() : 0);
  return result;
 }
}

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

@Override
 public int hashCode() {
  int result = m_tableName != null ? m_tableName.hashCode() : 0;
  result = 31 * result + Arrays.hashCode(m_startRow);
  result = 31 * result + Arrays.hashCode(m_endRow);
  result = 31 * result + (m_regionLocation != null ? m_regionLocation.hashCode() : 0);
  return result;
 }
}

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

@Override
 public int hashCode() {
  int result = tableName != null ? tableName.hashCode() : 0;
  result = 31 * result + (scan != null ? scan.hashCode() : 0);
  result = 31 * result + (startRow != null ? Arrays.hashCode(startRow) : 0);
  result = 31 * result + (endRow != null ? Arrays.hashCode(endRow) : 0);
  result = 31 * result + (regionLocation != null ? regionLocation.hashCode() : 0);
  result = 31 * result + (encodedRegionName != null ? encodedRegionName.hashCode() : 0);
  return result;
 }
}

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

@Override
public int hashCode() {
 int result = (tableName != null ? tableName.hashCode() : 0);
 result = 31 * result + (state != null ? state.hashCode() : 0);
 return result;
}

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

public MetricsTableSourceImpl(String tblName,
  MetricsTableAggregateSourceImpl aggregate, MetricsTableWrapperAggregate tblWrapperAgg) {
 LOG.debug("Creating new MetricsTableSourceImpl for table ");
 this.tableName = TableName.valueOf(tblName);
 this.agg = aggregate;
 agg.register(tblName, this);
 this.tableWrapperAgg = tblWrapperAgg;
 this.registry = agg.getMetricsRegistry();
 this.tableNamePrefix = "Namespace_" + this.tableName.getNamespaceAsString() +
   "_table_" + this.tableName.getQualifierAsString() + "_metric_";
 this.hashCode = this.tableName.hashCode();
}

相关文章