@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; } }
@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; } }
/** * 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()); }
/** * @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; }
@Override public int hashCode() { int result = (tableName != null ? tableName.hashCode() : 0); result = 31 * result + (state != null ? state.hashCode() : 0); return result; }
@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; }
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); } } }
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); } } }
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(); }
@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; } }
@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; }
"\n"); final Random rand = new Random(tableName.hashCode() * 17L + 12938197137L); final int numCF = families.size(); final byte[][] cfBytes = new byte[numCF][];
/** * @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; }
@Override public int hashCode() { int result = (tableName != null ? tableName.hashCode() : 0); result = 31 * result + (state != null ? state.hashCode() : 0); return result; }
@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; }
@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; } }
@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; } }
@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; } }
@Override public int hashCode() { int result = (tableName != null ? tableName.hashCode() : 0); result = 31 * result + (state != null ? state.hashCode() : 0); return result; }
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(); }