org.apache.hadoop.hbase.wal.WALKeyImpl.setWriteEntry()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(98)

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

WALKeyImpl.setWriteEntry介绍

暂无

代码示例

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. }
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. }
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. }
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. }
  11. });

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

  1. @Override
  2. public long append(RegionInfo info, WALKeyImpl key, WALEdit edits, boolean inMemstore)
  3. throws IOException {
  4. WriteEntry writeEntry = key.getMvcc().begin();
  5. if (!edits.isReplay()) {
  6. for (Cell cell : edits.getCells()) {
  7. PrivateCellUtil.setSequenceId(cell, writeEntry.getWriteNumber());
  8. }
  9. }
  10. key.setWriteEntry(writeEntry);
  11. if (!this.listeners.isEmpty()) {
  12. final long start = System.nanoTime();
  13. long len = 0;
  14. for (Cell cell : edits.getCells()) {
  15. len += PrivateCellUtil.estimatedSerializedSizeOf(cell);
  16. }
  17. final long elapsed = (System.nanoTime() - start) / 1000000L;
  18. for (WALActionsListener listener : this.listeners) {
  19. listener.postAppend(len, elapsed, key, edits);
  20. }
  21. }
  22. return -1;
  23. }

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

  1. /**
  2. * Here is where a WAL edit gets its sequenceid. SIDE-EFFECT is our stamping the sequenceid into
  3. * every Cell AND setting the sequenceid into the MVCC WriteEntry!!!!
  4. * @return The sequenceid we stamped on this edit.
  5. */
  6. long stampRegionSequenceId(MultiVersionConcurrencyControl.WriteEntry we) throws IOException {
  7. long regionSequenceId = we.getWriteNumber();
  8. if (!this.getEdit().isReplay() && inMemstore) {
  9. for (Cell c : getEdit().getCells()) {
  10. PrivateCellUtil.setSequenceId(c, regionSequenceId);
  11. }
  12. }
  13. getKey().setWriteEntry(we);
  14. return regionSequenceId;
  15. }

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. };
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. };
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. };
  11. });

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

  1. @Override
  2. public Object answer(InvocationOnMock invocation) {
  3. WALKeyImpl walKey = invocation.getArgument(1);
  4. MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
  5. if (mvcc != null) {
  6. MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
  7. walKey.setWriteEntry(we);
  8. }
  9. return 01L;
  10. };
  11. });

相关文章