Commit Graph

863 Commits

Author SHA1 Message Date
Phil Yang 5cadcd59aa HBASE-9465 Push entries to peer clusters serially
Signed-off-by: zhangduo <zhangduo@apache.org>
2016-08-09 15:25:50 +08:00
Vivek 30d7eeaefe HBASE-15866 Split hbase.rpc.timeout into *.read.timeout and *.write.timeout
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Amending-Author: Andrew Purtell <apurtell@apache.org>
2016-08-06 16:55:09 -07:00
stack 0206dc67d6 Revert "HBASE-16308 Contain protobuf references Gather up the pb references into a few locations only rather than have pb references distributed all about the code base."
This reverts commit ed87a81b4b.
2016-08-05 15:18:48 -07:00
stack ed87a81b4b HBASE-16308 Contain protobuf references Gather up the pb references into a few locations only rather than have pb references distributed all about the code base.
Purge ServiceException from Callable subclasses by pushing SE handling
up into the parent Callable class (varies by context but this is basic
patten). Allows us remove a bunch of boilerplate.
Do this in the public facing classes in particular (though if
an API has SE in it -- which a few do, this patch leaves these
untouched -- for now.) Make it so HBaseAdmin and HTable have no
direct pb imports (except for endpoint processor API).

Change a few of the HBaseAdmin calls to be retrying where comments
ask that we do retry rather than one time.

Purge TimeLimitedRpcController. Lets just have one override of RpcController.

        M hbase-client/src/main/java/org/apache/hadoop/hbase/client/AbstractRegionServerCallable.java
         Cleanup. Make it clear this is an odd class for async hbase intro.

        M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
         Refactor of RegionServerCallable allows me clean up a bunch of
         boilerplate in here and remove protobuf references.

        M hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
          Purge protobuf references everywhere except a reference to a throw of a
          ServiceException in method checkHBaseAvailable. I deprecated it in favor
          of new available method (the SE is not actually needed)

        M hbase-client/src/main/java/org/apache/hadoop/hbase/client/PayloadCarryingServerCallable.java
         Move the RetryingTimeTracker instance in here from HTable.
         Allows me to contain tracker and remove a repeated code in HTable.

        M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionServerCallable.java
         Clean up move set up of rpc in here rather than have it repeat in HTable.
         Allows me to remove protobuf references from a bunch of places.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/FlushRegionCallable.java
     Make use of the push of boilerplate up into RegionServerCallable

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/MultiServerCallable.java
    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/PayloadCarryingServerCallable.java
    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionAdminServiceCallable.java
    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.java
    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/SecureBulkLoadClient.java
    M hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
     Move boilerplate up into superclass.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetryingTimeTracker.java
     Cleanup

    M hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEditsReplaySink.java
    M hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
     Factor in TimeLimitedRpcController. Just have one RpcController override.

    D hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/TimeLimitedRpcController.java
     Removed. Lets have one override of pb rpccontroller only.

    M hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
     (handleRemoteException) added
     (toText) added

Signed-off-by: stack <stack@apache.org>
2016-08-05 10:13:58 -07:00
Sean Busbey 60b79e2daa HBASE-16321 ensure no findbugs-jsr305
Signed-off-by: Esteban Gutierrez <esteban@apache.org>
2016-08-05 10:16:29 -05:00
zhangduo b35cf8f93a HBASE-16225 Refactor ScanQueryMatcher 2016-08-02 14:01:28 +08:00
stack c29024c017 HBASE-16256 Purpose of EnvironmentEdge, EnvironmentEdgeManager (Sai Teja Ranuva) 2016-07-29 16:34:22 -07:00
anoopsjohn 00c2a5da7b HBASE-16286 When TagRewriteCell are not copied to MSLAB, deep clone it while adding to Memstore. 2016-07-27 22:29:26 +05:30
zhangduo bcf409e11f HBASE-16280 Use hash based map in SequenceIdAccounting 2016-07-26 11:31:32 +08:00
anoopsjohn 2df0ef549a HBASE-16205 When Cells are not copied to MSLAB, deep clone it while adding to Memstore. 2016-07-25 22:58:32 +05:30
Matteo Bertozzi cc766df28b HBASE-16272 Overflow in ServerName's compareTo method (Huaxiang Sun) 2016-07-22 15:28:04 -07:00
Jerry He 70f330dc84 Consolidate SecureBulkLoadEndpoint into HBase core as default for bulk load 2016-07-19 19:53:10 -07:00
Jerry He 632969787a HBASE-14548 Expand how table coprocessor jar and dependency path can be specified (Xiang Li) 2016-07-09 18:01:49 -07:00
stack 496fd9837a HBASE-16176 Bug fixes/improvements on HBASE-15650 Remove
TimeRangeTracker as point of contention when many threads reading a StoreFile
 Fixes HBASE-16074 ITBLL fails, reports lost big or tiny families broken
 scanning because of a side effect of a clean up in  HBASE-15650 to make
 TimeRange construction consistent exposed a latent issue in
 TimeRange#compare. See HBASE-16074 for more detail.

Also change HFile Writer constructor so we pass in the TimeRangeTracker, if one,
on construction rather than set later (the flag and reference were not volatile
so could have made for issues in concurrent case). And make sure the construction
of a TimeRange from a TimeRangeTracer on open of an HFile Reader never makes a
bad minimum value, one that would preclude us reading any values from a file
(set min to 0)

M hbase-common/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java
 Call through to next constructor (if minStamp was 0, we'd skip setting
 allTime=true). Add asserts that timestamps are not < 0 cos it messes
 us up if they are (we already were checking for < 0 on construction but
 assert passed in timestamps are not < 0).

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
 Add constructor override that takes a TimeRangeTracker (set when flushing
 but not when compacting)

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
 Add override creating an HFile in tmp that takes a TimeRangeTracker

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
 Add override for HFile Writer that takes a TimeRangeTracker Take it on
 construction instead of having it passed by a setter later (flags and
 reference set by the setter were not volatile... could have been prob
 in concurrent case)

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
 Log WARN if bad initial TimeRange value (and then 'fix' it)

M hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTimeRangeTracker.java
 A few tests to prove serialization works as expected and that we'll get a bad min if not constructed properly.

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
 Handle OLDEST_TIMESTAMP explictly. Don't expect TimeRange to do it.

M hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
 Refactor from junit3 to junit4 and add test for this weird case.
2016-07-08 18:20:31 -07:00
Andrew Purtell 318751cfd6 HBASE-16091 Canary takes lot more time when there are delete markers in the table (Vishal Khandelwal) 2016-07-05 11:13:48 -07:00
stack d1d8cc71c9 HBASE-16150 Remove ConcurrentIndex (Hiroshi Ikeda) 2016-06-30 15:03:32 -07:00
tedyu 6fb0dd07a8 HBASE-16139 Use CellUtil instead of KeyValueUtil in Import (NIDHI GAMBHIR) 2016-06-29 02:45:00 -07:00
chenheng 68c1b34dbc HBASE-16040 Remove configuration "hbase.replication" 2016-06-24 10:41:35 +08:00
Elliott Clark 65a8d77433 HBASE-16061 Allow logging to a buffered console 2016-06-17 17:06:12 -07:00
Ashu Pachauri 3abd52bdc6 HBASE-15429 Add split policy for busy regions
Signed-off-by: Elliott Clark <eclark@apache.org>
2016-06-16 17:36:54 -07:00
Enis Soztutar bff35d6387 HBASE-15950 Fix memstore size estimates to be more tighter 2016-06-15 13:34:39 -07:00
anoopsjohn 17bcf14fea HBASE-15525 OutOfMemory could occur when using BoundedByteBufferPool during RPC bursts. 2016-06-14 19:03:54 +05:30
Matteo Bertozzi d9463bcce0 HBASE-15989 Remove hbase.online.schema.update.enable 2016-06-08 13:09:31 -07:00
Ramkrishna b21c56e795 HBASE-15174 Client Public API should not have PB objects in 2.0 (Ram) 2016-06-06 10:11:38 +05:30
Lars Hofhansl fc890a2ecb HBASE-15881 Allow BZIP2 compression. 2016-06-02 12:19:02 -07:00
Apekshit 1a27278624 HBASE-15915 Set timeouts on hanging tests. Tests run: 8, Time elapsed: 94.191 sec - in org.apache.hadoop.hbase.master.procedure.TestMasterFailoverWithProcedures Tests run: 103, Time elapsed: 69.057 sec - in org.apache.hadoop.hbase.regionserver.TestHRegion Tests run: 103, Time elapsed: 67.957 sec - in org.apache.hadoop.hbase.regionserver.TestHRegionWithInMemoryFlush Tests run: 5, Time elapsed: 34.629 sec - in org.apache.hadoop.hbase.regionserver.TestRegionMergeTransactionOnCluster Tests run: 9, Time elapsed: 82.913 sec - in org.apache.hadoop.hbase.snapshot.TestFlushSnapshotFromClient Tests run: 9, Time elapsed: 80.458 sec - in org.apache.hadoop.hbase.snapshot.TestMobFlushSnapshotFromClient (Apekshit)
Change-Id: Ia7b986ca6276ff5498f588c0b1b9c570e2a9d798

Signed-off-by: stack <stack@apache.org>
2016-05-30 21:13:55 -07:00
Youngjoon Kim 47176049f8 HBASE-15897 Fix a wrong comment about QOS order
Signed-off-by: stack <stack@apache.org>
2016-05-29 14:35:35 -07:00
Sean Mackrory f4470af95d HBASE-15891. Closeable resources potentially not getting closed if exception is thrown.
Signed-off-by: stack <stack@apache.org>
2016-05-28 21:32:22 -07:00
Sean Mackrory 3b6e6e6c25 HBASE-15889. String case conversions are locale-sensitive, used without locale
Signed-off-by: Sean Busbey <busbey@apache.org>
2016-05-28 10:41:31 -07:00
tedyu 838c306c0a HBASE-15769 Perform validation on cluster key for add_peer (Matt Warhaftig) 2016-05-17 11:01:26 -07:00
Sean Busbey e0aff10901 HBASE-15780 Make AuthUtil public and rely on it for talking to secure HBase.
Signed-off-by: Gary Helmling <garyh@apache.org>
Signed-off-by: Mikhail Antonov <antonov@apache.org>
Signed-off-by: stack <stack@apache.org>
2016-05-16 00:50:14 -05:00
anoopsjohn c9ebcd4e29 HBASE-15785 Unnecessary lock in ByteBufferArray. 2016-05-11 15:56:41 +05:30
Jonathan M Hsieh 541d1da5fe HBASE-15791 Improve javadoc around ScheduledChore 2016-05-09 08:41:28 -07:00
Ramkrishna 97ad33c691 HBASE-15609 Remove PB references from Result, DoubleColumnInterpreter and
any such public facing class for 2.0 (Ram)
2016-05-09 14:56:00 +05:30
Junegunn Choi 0e37063345 HBASE-15528 Clean up outdated entries in hbase-default.xml
Signed-off-by: Enis Soztutar <enis@apache.org>
2016-05-03 19:09:19 -07:00
anoopsjohn d1130582d5 HBASE-15735 Tightening of the CP contract. 2016-05-02 09:48:51 +05:30
anoopsjohn 4706303186 HBASE-15706 HFilePrettyPrinter should print out nicely formatted tags. (huaxiang sun) 2016-04-29 09:23:57 +05:30
tedyu 8a28c23431 HBASE-15686 Add override mechanism for the exempt classes when dynamically loading table coprocessor 2016-04-28 09:19:12 -07:00
Phil Yang 53d7316075 HBASE-15645 hbase.rpc.timeout is not used in operations of HTable
Signed-off-by: stack <stack@apache.org>
2016-04-26 10:51:29 -07:00
Enis Soztutar 9ba9cdeb47 HBASE-15683 Min latency in latency histograms are emitted as Long.MAX_VALUE 2016-04-21 10:44:03 -07:00
stack d815211f5a HBASE-15650 Remove TimeRangeTracker as point of contention when many threads reading a StoreFile
Refactor so we use the immutable, unsynchronized TimeRange when doing
    time-based checks at read time rather than use heavily synchronized
    TimeRangeTracker; let TimeRangeTracker be for write-time only.

    While in here, changed the Segment stuff so that when an immutable
    segment, it uses TimeRange rather than TimeRangeTracker too.

    M hbase-common/src/main/java/org/apache/hadoop/hbase/io/TimeRange.java
      Make allTime final.
      Add a includesTimeRange method copied from TimeRangeTracker.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
      Change name of a few methods so they match TimeRange methods that do
      same thing.
      (getTimeRangeTracker, getTimeRange, toTimeRange) add utility methods

    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ImmutableSegment.java
      Change ImmutableSegment so it uses a TimeRange rather than
      TimeRangeTracker.. it is read-only. Redo shouldSeek, getMinTimestamp,
      updateMetaInfo, and getTimeRangeTracker so we use TimeRange-based
      implementations instead of TimeRangeTracker implementations.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MutableSegment.java
      Implement shouldSeek, getMinTimestamp, updateMetaInfo, and
      getTimeRangeTracker using TimeRangeTracker.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Segment.java
      Make methods that were using TimeRangeTracker abstract and instead
      have the implementations do these methods how they want either using
      TimeRangeTracker when a mutable segment or TimeRange when an immutable
      segment.

    M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
      Change Reader to use TimeRange-based checks instead of
      TimeRangeTracker.

    Signed-off-by: stack <stack@apache.org>
2016-04-15 10:13:42 -07:00
tedyu 6930da781b HBASE-15187 Integrate CSRF prevention filter to REST gateway 2016-04-15 09:38:31 -07:00
tedyu ff9c92e168 HBASE-14985 TimeRange constructors should set allTime when appropriate (Geoffrey Jacoby) 2016-04-11 16:59:45 -07:00
Junegunn Choi ff6a339582 HBASE-15569 Make Bytes.toStringBinary faster
Signed-off-by: stack <stack@apache.org>
2016-03-31 21:23:44 -07:00
stack d7a4499dfc HBASE-15392 Single Cell Get reads two HFileBlocks
M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
moreRowsMayExistAfterCell Exploit the fact a Scan is a Get Scan. Also save compares
if no non-default stopRow.

M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
optimize Add doc on what is being optimized. Also, if a Get Scan, do not
optimize else we'll keep going after our row is DONE.
Another place to make use of the Get Scan fact is when we are DONE.. if
Get Scan, we can close out the scan.

M hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
Add tests for Get Scans and optimize around block loading.
2016-03-23 14:37:14 -07:00
anoopsjohn cadfb21f4b HBASE-15064 BufferUnderflowException after last Cell fetched from an HFile Block served from L2 offheap cache - Addendum. 2016-03-23 15:03:50 +05:30
stack 12f66e3060 HBASE-15477 Purge 'next block header' from cached blocks
When we read from HDFS, we overread to pick up the next blocks header.
Doing this saves a seek as we move through the hfile; we save having to
do an explicit seek just to read the block header every time we need to
read the body.  We used to read in the next header as part of the
current blocks buffer. This buffer was then what got persisted to
blockcache; so we were over-persisting: our block plus the next blocks'
header (33 bytes).

This patch undoes this over-persisting.

Removes support for version 1 blocks (0.2 was added in hbase-0.92.0).
Not needed any more.

There is an open question on whether checksums should be persisted
when caching. The code seems to say no but if cache is SSD backed or
backed by anything that does not do error correction, we'll want
checksums.

Adds loads of documentation.

M hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockType.java
  (write) Add writing from a ByteBuff.

M hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java
  (toString) Add one so ByteBuff looks like ByteBuffer when you click on
  it in IDE

M hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
  Remove support for version 1 blocks.

  Cleaned up handling of metadata added when we serialize a block to
  caches. Metadata is smaller now.

  When we serialize (used when caching), do not persist the next blocks
  header if present.

  Removed a bunch of methods, a few of which had overlapping
  functionality and others that exposed too much of our internals.
  Also removed a bunch of constructors and unified the constructors we
  had left over making them share a common init method.
  Shutdown access to defines that should only be used internally here.

  Renamed all to do w/ 'EXTRA' and 'extraSerialization' to instead talk
  about metadata saved to caches; was unclear previously what EXTRA was
  about.

  Renamed static final declarations as all uppercase.

  (readBlockDataInternal): Redid. Couldn't make sense of it previously.
  Undid heavy-duty parse of header by constructing HFileBlock. Other
  cleanups. Its 1/3rd the length it used to be. More to do in here.
2016-03-22 18:45:17 -07:00
stack a13d6e000d Revert "HBASE-15392 Single Cell Get reads two HFileBlocks M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java moreRowsMayExistAfterCell Exploit the fact a Scan is a Get Scan. Also save compares if no non-default stopRow."
Revert mistaken commit

This reverts commit 7073f69993.
2016-03-22 18:39:22 -07:00
stack 54a543de22 Revert "HBASE-15477 Purge 'next block header' from cached blocks"
Overcommit. Revert to fix.

This reverts commit 000117ad9f.
2016-03-22 18:37:25 -07:00
stack 000117ad9f HBASE-15477 Purge 'next block header' from cached blocks
When we read from HDFS, we overread to pick up the next blocks header.
Doing this saves a seek as we move through the hfile; we save having to
do an explicit seek just to read the block header every time we need to
read the body.  We used to read in the next header as part of the
current blocks buffer. This buffer was then what got persisted to
blockcache; so we were over-persisting: our block plus the next blocks'
header (33 bytes).

This patch undoes this over-persisting.

Removes support for version 1 blocks (0.2 was added in hbase-0.92.0).
Not needed any more.

There is an open question on whether checksums should be persisted
when caching. The code seems to say no but if cache is SSD backed or
backed by anything that does not do error correction, we'll want
checksums.

Adds loads of documentation.

M hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockType.java
  (write) Add writing from a ByteBuff.

M hbase-common/src/main/java/org/apache/hadoop/hbase/nio/ByteBuff.java
  (toString) Add one so ByteBuff looks like ByteBuffer when you click on
  it in IDE

M hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
  Remove support for version 1 blocks.

  Cleaned up handling of metadata added when we serialize a block to
  caches. Metadata is smaller now.

  When we serialize (used when caching), do not persist the next blocks
  header if present.

  Removed a bunch of methods, a few of which had overlapping
  functionality and others that exposed too much of our internals.
  Also removed a bunch of constructors and unified the constructors we
  had left over making them share a common init method.
  Shutdown access to defines that should only be used internally here.

  Renamed all to do w/ 'EXTRA' and 'extraSerialization' to instead talk
  about metadata saved to caches; was unclear previously what EXTRA was
  about.

  Renamed static final declarations as all uppercase.

  (readBlockDataInternal): Redid. Couldn't make sense of it previously.
  Undid heavy-duty parse of header by constructing HFileBlock. Other
  cleanups. Its 1/3rd the length it used to be. More to do in here.
2016-03-22 13:42:38 -07:00