org.apache.hadoop.hbase.regionserver.wal.HLogKey Java Examples
The following examples show how to use
org.apache.hadoop.hbase.regionserver.wal.HLogKey.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Indexer.java From phoenix with Apache License 2.0 | 6 votes |
@Override public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException { if (this.disabled) { super.preWALRestore(env, info, logKey, logEdit); return; } // TODO check the regions in transition. If the server on which the region lives is this one, // then we should rety that write later in postOpen. // we might be able to get even smarter here and pre-split the edits that are server-local // into their own recovered.edits file. This then lets us do a straightforward recovery of each // region (and more efficiently as we aren't writing quite as hectically from this one place). /* * Basically, we let the index regions recover for a little while long before retrying in the * hopes they come up before the primary table finishes. */ Collection<Pair<Mutation, byte[]>> indexUpdates = extractIndexUpdate(logEdit); recoveryWriter.write(indexUpdates); }
Example #2
Source File: Indexer.java From phoenix with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException { if (this.disabled) { super.preWALRestore(env, info, logKey, logEdit); return; } // TODO check the regions in transition. If the server on which the region lives is this one, // then we should rety that write later in postOpen. // we might be able to get even smarter here and pre-split the edits that are server-local // into their own recovered.edits file. This then lets us do a straightforward recovery of each // region (and more efficiently as we aren't writing quite as hectically from this one place). /* * Basically, we let the index regions recover for a little while long before retrying in the * hopes they come up before the primary table finishes. */ Collection<Pair<Mutation, byte[]>> indexUpdates = extractIndexUpdate(logEdit); recoveryWriter.writeAndKillYourselfOnFailure(indexUpdates); }
Example #3
Source File: TestWALRecoveryCaching.java From phoenix with Apache License 2.0 | 5 votes |
@Override public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException { try { LOG.debug("Restoring logs for index table"); if (allowIndexTableToRecover != null) { allowIndexTableToRecover.await(); LOG.debug("Completed index table recovery wait latch"); } } catch (InterruptedException e) { Assert.fail("Should not be interrupted while waiting to allow the index to restore WALs."); } }
Example #4
Source File: TestWALRecoveryCaching.java From phoenix with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException { try { LOG.debug("Restoring logs for index table"); if (allowIndexTableToRecover != null) { allowIndexTableToRecover.await(); LOG.debug("Completed index table recovery wait latch"); } } catch (InterruptedException e) { Assert.fail("Should not be interrupted while waiting to allow the index to restore WALs."); } }
Example #5
Source File: IndexLogRollSynchronizer.java From phoenix with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void visitLogEntryBeforeWrite(HRegionInfo info, HLogKey logKey, WALEdit logEdit) { // noop }
Example #6
Source File: IndexLogRollSynchronizer.java From phoenix with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void visitLogEntryBeforeWrite(HTableDescriptor htd, HLogKey logKey, WALEdit logEdit) { // noop }