Commit Graph

4920 Commits

Author SHA1 Message Date
Michael Stack 327e2d1f74 HBASE-5328 Small changes to Master to make it more testable
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303626 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 00:02:36 +00:00
larsh 8105f90937 HBASE-4940 hadoop-metrics.properties can include configuration of the rest context for ganglia (Mubarak Seyed)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303553 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 20:16:27 +00:00
larsh 4ba5a9d29e HBASE-5433 [REST] Add metrics to keep track of success/failure count (Mubarak Seyed)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303536 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 19:48:11 +00:00
Jonathan Hsieh 865b14133b HBASE-5589 Add of the offline call to the Master Interface
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303519 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 19:30:54 +00:00
Zhihong Yu 5b2d6ebfc5 HBASE-5542 revert due to broken trunk build
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303517 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 19:28:33 +00:00
Michael Stack 250252f400 HBASE-5560 Avoid RegionServer GC caused by timed-out calls
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303512 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 19:17:59 +00:00
Zhihong Yu ce36877d30 HBASE-5542 Unify HRegion.mutateRowsWithLocks() and HRegion.processRow() (Scott Chen)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303490 13f79535-47bb-0310-9956-ffa450edef68
2012-03-21 18:25:18 +00:00
larsh 41f31490ff HBASE-5569 Do not collect deleted KVs when they are still in use by a scanner.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303220 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 23:57:53 +00:00
Michael Stack 5856e90720 HBASE-5597 Findbugs check in test-patch.sh always fails
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303196 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 23:08:12 +00:00
Jonathan Hsieh c38f889627 HBASE-5603 rolling-restart.sh script hangs when attempting to detect expiration of /hbase/master znode
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303184 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 22:46:54 +00:00
mbautin b4dccf9198 HBASE-5605 [jira] compression does not work in Store.java
Author: Yongqiang He

Summary: need to pass compression parameter to WriterBuilder

Test Plan: one simple and straightforward change

Reviewers: mbautin

Reviewed By: mbautin

CC: tedyu

Differential Revision: https://reviews.facebook.net/D2391

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303150 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 21:04:38 +00:00
ramkrishna 2f58da0489 HBASE-5520 Support reseek() at RegionScanner (Ram)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1303005 13f79535-47bb-0310-9956-ffa450edef68
2012-03-20 17:10:50 +00:00
Doug Meil 45a15792f0 hbase-5570 ops_mgt.xml - fixed self-reference with compression section
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1302658 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 21:14:55 +00:00
mbautin 6be64072e8 HBASE-5521 [jira] Move compression/decompression to an encoder specific encoding
context

Author: Yongqiang He

Summary:
https://issues.apache.org/jira/browse/HBASE-5521

As part of working on HBASE-5313, we want to add a new columnar encoder/decoder.
It makes sense to move compression to be part of encoder/decoder:
1) a scanner for a columnar encoded block can do lazy decompression to a
specific part of a key value object
2) avoid an extra bytes copy from encoder to hblock-writer.

If there is no encoder specified for a writer, the HBlock.Writer will use a
default compression-context to do something very similar to today's code.

Test Plan: existing unit tests verified by mbautin and tedyu. And no new test
added here since this code is just a preparation for columnar encoder. Will add
testcase later in that diff.

Reviewers: dhruba, tedyu, sc, mbautin

Reviewed By: mbautin

Differential Revision: https://reviews.facebook.net/D2097

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1302602 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 19:12:19 +00:00
Michael Stack 047d209cee HBASE-5955 Fix NoSuchMethodException in 0.92 when running on local filesystem
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1302207 13f79535-47bb-0310-9956-ffa450edef68
2012-03-18 19:40:24 +00:00
Michael Stack 101e6f08ba Fix flag passed building hbase
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1302004 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 20:49:47 +00:00
Jonathan Hsieh 37da60f92f HBASE-5588 Deprecate/remove AssignmentManager#clearRegionFromTransition
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301885 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 07:34:22 +00:00
larsh fda76c71cb Revert HBASE-5569
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301872 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 06:59:31 +00:00
Jonathan Hsieh f34edd6378 HBASE-5563 Add comparison of regionId to HRegionInfo#compareTo (chunhui and jmhsieh)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301779 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 21:50:05 +00:00
Zhihong Yu 1d24d71821 HBASE-5549 HBASE-5572 Master can fail if ZooKeeper session expires (N Keywal)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301775 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 21:30:47 +00:00
mbautin 0ad4e32993 [jira] [HBASE-5575] Configure Arcanist lint engine for HBase
Summary: Adding Java lint engine to HBase's .arcconfig. The lint engine itself
is part of the arc-jira repository that lives at
https://github.com/facebook/arc-jira/. There are some changes to be made there
to prevent lint from reporting errors for unmodified lines.

Test Plan: arc lint

Reviewers: nspiegelberg, Kannan, Karthik, JIRA, Liyin

Reviewed By: Liyin

Differential Revision: https://reviews.facebook.net/D2289

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301751 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 20:42:24 +00:00
Michael Stack 8a4c928de0 HBASE-5592 Make it easier to get a table from shell
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301715 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 19:45:06 +00:00
Zhihong Yu 458a3ff092 HBASE-5206 Port HBASE-5155 to trunk (Ashutosh Jindal)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301709 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 19:14:11 +00:00
Michael Stack a388bae569 HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301688 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 18:46:53 +00:00
Zhihong Yu 8e84390b37 HBASE-5568 Multi concurrent flushcache() for one region could cause data loss (Chunhui)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301639 13f79535-47bb-0310-9956-ffa450edef68
2012-03-16 16:39:44 +00:00
Zhihong Yu 4a5a27eac2 HBASE-5579 A Delete Version could mask other values (Daniel Ferro)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301173 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 20:03:47 +00:00
Michael Stack 273804e658 HBASE-4608 HLog Compression
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301165 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 19:32:01 +00:00
larsh 5055d4cfff HBASE-5569 Do not collect deleted KVs when they are still in use by a scanner.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1301135 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 18:46:31 +00:00
Zhihong Yu d73aee4f66 HBASE-5206 revert because of test failues in trunk build.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1300725 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 21:25:51 +00:00
Zhihong Yu 2ec60a022e HBASE-5206 port HBASE-5155 to TRUNK (Ashutosh Jindal)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1300711 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 20:29:54 +00:00
Michael Stack eebdfb5d65 HBASE-5574 DEFAULT_MAX_FILE_SIZE defaults to a negative value
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1300288 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 19:04:41 +00:00
Michael Stack 05423b150b HBASE-5179 Handle potential data loss due to concurrent processing of processFaileOver and ServerShutdownHandler
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1300194 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 15:35:54 +00:00
Michael Stack a728f94079 HBASE-5314 racefully rolling restart region servers in rolling-restart.sh
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299983 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 06:30:15 +00:00
Michael Stack 624b0a51b2 HBASE-5499 dev-support/test-patch.sh does not have execute perms
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299976 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 05:05:18 +00:00
Michael Stack 2314945b8b HBASE-5567 test-patch.sh has logic error in findbugs check
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299892 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 21:49:37 +00:00
Michael Stack e4fefa0073 HBASE-5399 Cut the link between the client and the zookeeper ensemble
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299872 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 21:20:33 +00:00
Michael Stack d04201683a HBASE-5562 test-patch.sh reports a javadoc warning when there are no new javadoc warnings
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299824 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 20:19:25 +00:00
mbautin be78e3c4ee [jira] [HBASE-5292] Prevent counting getSize on compactions
Author: Zhiqiu Kong

Summary:
Added two separate metrics for both get() and next(). This is done by
refactoring on internal next() API. To be more specific, only Get.get()
and ResultScanner.next() passes the metric name ("getsize" and
"nextsize" repectively) to
  HRegion::RegionScanner::next(List<KeyValue>, String)

This will eventually hit StoreScanner()::next((List<KeyValue>,
int, String) where the metrics are counted.

And their call paths are:

1) Get

HTable::get(final Get get)
=> HRegionServer::get(byte [] regionName, Get get)
=> HRegion::get(final Get get, final Integer lockid)
=> HRegion::get(final Get get)      [pass METRIC_GETSIZE to the
callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

2) Next

HTable::ClientScanner::next()
=> ScannerCallable::call()
=> HRegionServer::next(long scannerId)
=> HRegionServer::next(final long scannerId, int nbRows)  [pass
METRIC_NEXTSIZE to the callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

Test Plan:
1. Passed unit tests.
2. Created a testcase TestRegionServerMetrics::testGetNextSize to
guarantee:
 * Get/Next contributes to getsize/nextsize metrics
 * Both getsize/nextsize are per Column Family
 * Flush/compaction won't affect these two metrics

Reviewed By: mbautin

Reviewers: Kannan, mbautin, Liyin, JIRA

CC: Kannan, mbautin, Liyin, zhiqiu

Differential Revision: https://reviews.facebook.net/D1617

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299147 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 02:27:05 +00:00
Michael Stack e4c43d72bf HBASE-5535 Make the functions in task monitor synchronized
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299088 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 22:47:54 +00:00
Michael Stack 7d34da889e HBASE-5538 A metric to measure the size of the response queue in the hbase rpc server
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299084 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 22:40:12 +00:00
Michael Stack 293114eb51 HBASE-5555 add a pointer to a dns verification utility in hbase book/dns
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299073 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 22:08:31 +00:00
mbautin fc08d20ebd [jira] [HBASE-4542] Add filter info to slow query logging
Author: Zhiqiu Kong

Summary:
The original 89-fb diff is: https://reviews.facebook.net/D1263

Slow opertaion log does not provide enough information when a filter is
present. The followings are done to add the filter info:

1) Added toString() method for filters inheriting FilterBase, this
affect 22 filters and their subclasses. The info added includes the
filter's name and its members. For example, for TimestampsFilter, we'll
output its class name as well as the defined timestamps.

2) Added a field 'filter' in Get::toMap() and Scan::toMap() to enable
the logging of filter info.

Task ID: #750975

Blame Rev:

Test Plan:
1. Run and passed unit-tests to make sure it does not break things

2. Run kannan's script to trigger the slow operation logging, checked
for each filter to make sure the filter info was logged. To be more
detailed, the output log are as following (only 'filter' filed is put
here for ease of reading):

"filter":"TimestampsFilter (3/3): [2, 3, 5]"
"filter":"TimestampsFilter (5/6): [2, 3, 5, 7, 11]"
"filter":"ColumnPrefixFilter col2"
"filter":"ColumnRangeFilter [col2a, col2b]"
"filter":"ColumnCountGetFilter 8"
"filter":"ColumnPaginationFilter (4, 4)"
"filter":"InclusiveStopFilter row"
"filter":"PrefixFilter row"
"filter":"PageFilter 1"
"filter":"SkipFilter TimestampsFilter (1/1): [1000]"
"filter":"WhileMatchFilter TimestampsFilter (3/3): [2, 3, 5]"
"filter":"KeyOnlyFilter"
"filter":"FirstKeyOnlyFilter"
"filter":"MultipleColumnPrefixFilter (3/3): [a, b, c]"
"filter":"DependentColumnFilter (family, qualifier, true, LESS, value)"
"filter":"FamilyFilter (LESS, value)"
"filter":"QualifierFilter (LESS, value)"
"filter":"RowFilter (LESS, value)"
"filter":"ValueFilter (LESS, value)"
"filter":"KeyOnlyFilter"
"filter":"FirstKeyOnlyFilter"
"filter":"SingleColumnValueFilter (family, qualifier, EQUAL, value)"
"filter":"SingleColumnValueExcludeFilter (family, qualifier, EQUAL,
value)"
"filter":"FilterList AND (2/2): [KeyOnlyFilter, FirstKeyOnlyFilter]"
Please check ~zhiqiu/Codes/scripts/testFilter.rb for the testing script.

3. Added unit test cases to TestOperation to verify the filters'
toString() method works well.

Reviewed By: mbautin

Reviewers: Kannan, madhuvaidya, mbautin, JIRA

CC: Kannan, madhuvaidya, mbautin, zhiqiu, stack

Differential Revision: https://reviews.facebook.net/D1539

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299019 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 20:14:26 +00:00
Michael Stack cbdf0ca007 HBASE-5552 Clean up our jmx view; its a bit of a mess
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298923 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 16:54:13 +00:00
Zhihong Yu 35a36c2c66 HBASE-5213 "hbase master stop" does not bring down backup masters (Gregory)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298859 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 14:47:16 +00:00
larsh 5d9f98e09d HBASE-5541 Avoid holding the rowlock during HLog sync in HRegion.mutateRowWithLocks
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298678 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 00:52:25 +00:00
larsh 7ce77fc5d3 HBASE-5526 ^Cnfigurable file and directory based umask (Jesse Yates)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298657 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 23:58:17 +00:00
mbautin 961455cd9d [jira] [HBASE-5074] Support checksums in HBase block cache
Author: Dhruba

Summary:
HFile is enhanced to store a checksum for each block. HDFS checksum verification
is avoided while reading data into the block cache. On a checksum verification
failure, we retry the file system read request with hdfs checksums switched on
(thanks Todd).

I have a benchmark that shows that it reduces iops on the disk by about 40%. In
this experiment, the entire memory on the regionserver is allocated to the
regionserver's jvm and the OS buffer cache size is negligible. I also measured
negligible (<5%) additional cpu usage while using hbase-level checksums.

The salient points of this patch:

1. Each hfile's trailer used to have a 4 byte version number. I enhanced this so
that these 4 bytes can be interpreted as a (major version number, minor
version). Pre-existing hfiles have a minor version of 0. The new hfile format
has a minor version of 1 (thanks Mikhail). The hfile major version remains
unchanged at 2. The reason I did not introduce a new major version number is
because the code changes needed to store/read checksums do not differ much from
existing V2 writers/readers.

2. Introduced a HFileSystem object which is a encapsulates the FileSystem
objects needed to access data from hfiles and hlogs.  HDFS FileSystem objects
already had the ability to switch off checksum verifications for reads.

3. The majority of the code changes are located in hbase.io.hfie package. The
retry of a read on an initial checksum failure occurs inside the hbase.io.hfile
package itself.  The code changes to hbase.regionserver package are minor.

4. The format of a hfileblock is the header followed by the data followed by the
checksum(s). Each 16 K (configurable) size of data has a 4 byte checksum.  The
hfileblock header has two additional fields: a 4 byte value to store the
bytesPerChecksum and a 4 byte value to store the size of the user data
(excluding the checksum data). This is well explained in the associated
javadocs.

5. I added a test to test backward compatibility. I will be writing more unit
tests that triggers checksum verification failures aggressively. I have left a
few redundant log messages in the code (just for easier debugging) and will
remove them in later stage of this patch. I will also be adding metrics on
number of checksum verification failures/success in a later version of this
diff.

6. By default, hbase-level checksums are switched on and hdfs level checksums
are switched off for hfile-reads. No changes to Hlog code path here.

Test Plan: The default setting is to switch on hbase checksums for hfile-reads,
thus all existing tests actually validate the new code pieces. I will be writing
more unit tests for triggering checksum verification failures.

Reviewers: mbautin

Reviewed By: mbautin

CC: JIRA, tedyu, mbautin, dhruba, todd, stack

Differential Revision: https://reviews.facebook.net/D1521

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298641 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 22:55:49 +00:00
larsh 17a4a3fd52 HBASE-5529 MR test failures becuase MALLOC_ARENA_MAX is not set (Gregory Chanan)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298574 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 20:55:57 +00:00
Zhihong Yu c4426b5b79 HBASE-5515 Add a processRow API that supports atomic multiple reads and writes on a row (Scott Chen)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298533 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 19:40:27 +00:00
Zhihong Yu 990de61c9b HBASE-5514 Compile against hadoop 0.24-SNAPSHOT (Mingjie)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298488 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 17:58:08 +00:00