org.apache.hadoop.hbase.regionserver.HStore.notifyChangedReadersObservers()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(108)

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

HStore.notifyChangedReadersObservers介绍

[英]Notify all observers that set of Readers has changed.
[中]通知所有观察者读卡器集已更改。

代码示例

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

notifyChangedReadersObservers(sfs);
if (LOG.isTraceEnabled()) {
 long totalSize = getTotalSize(sfs);

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

private boolean updateStorefiles(final List<StoreFile> sfs, final long snapshotId)
  throws IOException {
 this.lock.writeLock().lock();
 try {
  this.storeEngine.getStoreFileManager().insertNewFiles(sfs);
  if (snapshotId > 0) {
   this.memstore.clearSnapshot(snapshotId);
  }
 } finally {
  // We need the lock, as long as we are updating the storeFiles
  // or changing the memstore. Let us release it before calling
  // notifyChangeReadersObservers. See HBASE-4485 for a possible
  // deadlock scenario that could have happened if continue to hold
  // the lock.
  this.lock.writeLock().unlock();
 }
 // Tell listeners of the change in readers.
 notifyChangedReadersObservers();
 if (LOG.isTraceEnabled()) {
  long totalSize = 0;
  for (StoreFile sf : sfs) {
   totalSize += sf.getReader().length();
  }
  String traceMessage = "FLUSH time,count,size,store size,store files ["
    + EnvironmentEdgeManager.currentTime() + "," + sfs.size() + "," + totalSize
    + "," + storeSize + "," + storeEngine.getStoreFileManager().getStorefileCount() + "]";
  LOG.trace(traceMessage);
 }
 return needsCompaction();
}

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

private void bulkLoadHFile(StoreFile sf) throws IOException {
 StoreFile.Reader r = sf.getReader();
 this.storeSize += r.length();
 this.totalUncompressedBytes += r.getTotalUncompressedBytes();
 // Append the new storefile into the list
 this.lock.writeLock().lock();
 try {
  this.storeEngine.getStoreFileManager().insertNewFiles(Lists.newArrayList(sf));
 } finally {
  // We need the lock, as long as we are updating the storeFiles
  // or changing the memstore. Let us release it before calling
  // notifyChangeReadersObservers. See HBASE-4485 for a possible
  // deadlock scenario that could have happened if continue to hold
  // the lock.
  this.lock.writeLock().unlock();
 }
 notifyChangedReadersObservers();
 LOG.info("Loaded HFile " + sf.getFileInfo() + " into store '" + getColumnFamilyName());
 if (LOG.isTraceEnabled()) {
  String traceMessage = "BULK LOAD time,size,store size,store files ["
    + EnvironmentEdgeManager.currentTime() + "," + r.length() + "," + storeSize
    + "," + storeEngine.getStoreFileManager().getStorefileCount() + "]";
  LOG.trace(traceMessage);
 }
}

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

notifyChangedReadersObservers();

相关文章

HStore类方法