Commit Graph

5253 Commits

Author SHA1 Message Date
Michael Stack e92a4023d5 HADOOP-2083 TestTableIndex failed in patch build #970 and #956
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@591039 13f79535-47bb-0310-9956-ffa450edef68
2007-11-01 15:01:43 +00:00
Jim Kellerman 0c8412cb79 HADOOP-2126 Use Bob Jenkins' hash for bloom filters
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@590875 13f79535-47bb-0310-9956-ffa450edef68
2007-11-01 01:48:46 +00:00
Michael Stack 1aeb23aeee HADOOP-2084 Add a LocalHBaseCluster
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@588264 13f79535-47bb-0310-9956-ffa450edef68
2007-10-25 16:12:51 +00:00
Jim Kellerman fa1c77bd3e HADOOP-2079 HADOOP-2056 Fix generated HLog, HRegion names
HLog.splitLog was generating incorrect file names, HRegion was generating file names that could be far too long especially for local file systems, HMaster had a race condition in which an old HLog would get split by two threads simultaneously. 

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@586680 13f79535-47bb-0310-9956-ffa450edef68
2007-10-20 08:06:52 +00:00
Jim Kellerman cc202c4b74 HADOOP-2056 A table with row keys containing colon fails to split regions
Many modifications required because region names (which contain start key) were used as file or directory names. Now the startKey is encoded in an order preserving Base64 dialect.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@586159 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 22:21:09 +00:00
Michael Stack 0b92e8826a HADOOP-2064 TestSplit assertion and NPE failures (Patch build #952 and #953)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@585293 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 00:09:55 +00:00
Michael Stack 04cac52745 HADOOP-1872 TestCompaction assertions fail on some hosts
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@585276 13f79535-47bb-0310-9956-ffa450edef68
2007-10-16 22:27:30 +00:00
Jim Kellerman ab813c3673 HADOOP-2061 Add new Base64 dialects
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@585219 13f79535-47bb-0310-9956-ffa450edef68
2007-10-16 18:56:28 +00:00
Michael Stack 8a381624d9 HADOOP-2059 In tests, exceptions in min dfs shutdown should not fail test
(e.g. nightly #272)


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@584919 13f79535-47bb-0310-9956-ffa450edef68
2007-10-15 21:05:23 +00:00
Michael Stack f07a9fd89a HADOOP-2401 Add convenience put method that takes writable
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@584844 13f79535-47bb-0310-9956-ffa450edef68
2007-10-15 18:42:28 +00:00
Michael Stack 920c6b2021 HADOOP-2029 TestLogRolling fails too often in patch and nightlies
3rd commit against this issue.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@584286 13f79535-47bb-0310-9956-ffa450edef68
2007-10-12 21:58:12 +00:00
Michael Stack 8faa2ea9c6 HADOOP-2038 TestCleanRegionServerExit failed in patch build #927
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@584212 13f79535-47bb-0310-9956-ffa450edef68
2007-10-12 17:46:37 +00:00
Michael Stack 8b387823be HADOOP-2029 TestLogRolling fails too often in patch and nightlies
This is second commit against this issue.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@583963 13f79535-47bb-0310-9956-ffa450edef68
2007-10-11 21:49:40 +00:00
Michael Stack 00f32814d1 HADOOP-2035 Add logo to webapps
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@583946 13f79535-47bb-0310-9956-ffa450edef68
2007-10-11 20:33:53 +00:00
Michael Stack 642dd4294e HADOOP-2029 TestLogRolling fails too often in patch and nightlies
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@583839 13f79535-47bb-0310-9956-ffa450edef68
2007-10-11 14:45:36 +00:00
Michael Stack c9f105acd5 HADOOP-2017 TestRegionServerAbort failure in patch build #903 and
nightly #266


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@583309 13f79535-47bb-0310-9956-ffa450edef68
2007-10-09 21:48:11 +00:00
Michael Stack 5233c28aaa HADOOP-2011 Make hbase daemon scripts take args in same order as hadoop
daemon scripts


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@583037 13f79535-47bb-0310-9956-ffa450edef68
2007-10-09 03:25:00 +00:00
Michael Stack 79b3b1c6b2 HADOOP-2004 [hbase] webapp hql formatting bugs
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@582867 13f79535-47bb-0310-9956-ffa450edef68
2007-10-08 16:25:33 +00:00
Michael Stack eb22494fb4 HADOOP-1957 Web UI with report on cluster state and basic browsing of tables
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@582443 13f79535-47bb-0310-9956-ffa450edef68
2007-10-06 03:49:43 +00:00
Michael Stack 6c9ddf9f37 HADOOP-1957 Web UI with report on cluster state and basic browsing of tables
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@582442 13f79535-47bb-0310-9956-ffa450edef68
2007-10-06 03:09:50 +00:00
Jim Kellerman 6e4efdf697 HADOOP-1937 When the master times out a region server's lease, it is too aggressive in reclaiming the server's log.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@582165 13f79535-47bb-0310-9956-ffa450edef68
2007-10-05 09:39:32 +00:00
Jim Kellerman 1acbfbde1f HADOOP-1996 TestHStoreFile fails on windows if run multiple times
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@582066 13f79535-47bb-0310-9956-ffa450edef68
2007-10-05 03:26:32 +00:00
Jim Kellerman af8131b86d HADOOP-1990 Regression test instability affects nightly and patch builds
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@581995 13f79535-47bb-0310-9956-ffa450edef68
2007-10-04 19:58:56 +00:00
Jim Kellerman c56582d19b HADOOP-1960 If a region server cannot talk to the master before its lease times out, it should shut itself down
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@581396 13f79535-47bb-0310-9956-ffa450edef68
2007-10-02 21:42:07 +00:00
Jim Kellerman 2f9acbbd45 HADOOP-1975 HBase tests failing with java.lang.NumberFormatException
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@581047 13f79535-47bb-0310-9956-ffa450edef68
2007-10-01 19:45:02 +00:00
Jim Kellerman 188f9e6f23 HADOOP-1820 regionserver creates hlogs without bound
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@580811 13f79535-47bb-0310-9956-ffa450edef68
2007-09-30 23:46:04 +00:00
Jim Kellerman 8a3bc9c23e HADOOP-1966 Make HBase unit tests more reliable in the Hudson environment.
Set hbase.root in test/hbase-site.xml; when running a test, the default does not work consistantly.

When a HBase mini cluster is started on top of an existing mini dfs cluster, it should not shut down the mini dfs cluster when the mini HBase cluster is shut down.

TestDFSAbort catches exceptions, prints the stack trace and re-throws the exception, so you can see when the exception happened in the log.

Catch runtime exceptions that were escaping from FSUtils.isFileSystemAvailable, enabling more reliable detection of dfs failure. HRegionServer also now checks to see if it is still accepting client requests.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@580745 13f79535-47bb-0310-9956-ffa450edef68
2007-09-30 16:09:38 +00:00
Michael Stack 354c848546 HADOOP-1789 output formatting
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@580487 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 21:10:49 +00:00
Michael Stack 1236b87f48 HADOOP-1913 Build a Lucene index on an HBase table
Files I failed to add/delete on original commit


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@580399 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 16:12:24 +00:00
Michael Stack 7acd7d074a HADOOP-1928 Have master pass the regionserver the filesystem to use
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@580166 13f79535-47bb-0310-9956-ffa450edef68
2007-09-27 21:28:31 +00:00
Michael Stack ccf42acf70 HADOOP-1941 StopRowFilter throws NPE when passed null row
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@579410 13f79535-47bb-0310-9956-ffa450edef68
2007-09-25 23:04:08 +00:00
Jim Kellerman 87f305b608 HADOOP-1943 LogRolling test fails: reverting changes for HADOOP-1820
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@579353 13f79535-47bb-0310-9956-ffa450edef68
2007-09-25 19:13:50 +00:00
Jim Kellerman 2cf41fe535 HADOOP-1820 Regionserver creates hlogs without bound
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@579005 13f79535-47bb-0310-9956-ffa450edef68
2007-09-24 22:52:16 +00:00
Michael Stack 8f3b423b73 HADOOP-1913 Build a Lucene index on an HBase table
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@578987 13f79535-47bb-0310-9956-ffa450edef68
2007-09-24 21:38:10 +00:00
Jim Kellerman f81060229f HADOOP-1923, HADOOP-1924 a) tests fail sporadically because set up and tear down is inconsistent b) TestDFSAbort failed in nightly #242
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@577603 13f79535-47bb-0310-9956-ffa450edef68
2007-09-20 07:37:34 +00:00
Michael Stack 1657302ec1 HADOOP-1856 [Hbaseshell] Jar command using Hadoop RunJar util
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@576240 13f79535-47bb-0310-9956-ffa450edef68
2007-09-17 03:02:42 +00:00
Michael Stack 4404e14c16 HADOOP-1856 [Hbaseshell] Jar command using Hadoop RunJar util
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@576239 13f79535-47bb-0310-9956-ffa450edef68
2007-09-17 02:57:31 +00:00
Jim Kellerman 20a6c00b5c HADOOP-1888 NullPointerException in HMemcacheScanner (reprise)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575986 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 21:27:10 +00:00
Michael Stack b271048e2f HADOOP-1903 Possible data loss if Exception happens between snapshot and flush
to disk.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575982 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 21:11:47 +00:00
Michael Stack 7ce0506c27 HADOOP-1813 [hbase] OOME makes zombie of region server
Forgot to add below as part of last commit.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575950 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 17:58:13 +00:00
Michael Stack 83298b4721 HADOOP-1813 OOME makes zombie of region server
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575928 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 15:14:53 +00:00
Michael Stack 1596f8aa10 HADOOP-1888 NullPointerException in HMemcacheScanner
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575791 13f79535-47bb-0310-9956-ffa450edef68
2007-09-14 20:51:37 +00:00
Michael Stack d660cfc526 HADOOP-1720 Addition of HQL (Hbase Query Language) support in Hbase Shell
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575156 13f79535-47bb-0310-9956-ffa450edef68
2007-09-13 04:01:05 +00:00
Jim Kellerman aeceb916fc HADOOP-1884 Remove useless debugging log messages from hbase.mapred
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@575009 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 16:48:54 +00:00
Jim Kellerman c0c89222f1 HADOOP-1870 Once file system failure has been detected, don't check it again and get on with shutting down the hbase cluster.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574731 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 23:39:17 +00:00
Michael Stack d60908dcf9 HADOOP-1868 Make default configuration more responsive
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574404 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 23:27:34 +00:00
Michael Stack 5fe41420e6 HADOOP-1786 delete
Delete still fails on hp+ubuntu.  Its failing on later assertion.
Removing this too for now so build works again.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574389 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 22:25:54 +00:00
Michael Stack a214798763 HADOOP-1784 delete
M hbase/src/test/org/apache/hadoop/hbase/TestCompaction.java
    Removing failing assert so build works again.  This assert
    when it place passed on hudson build #722 but is failing on
    an hp+ubuntu install.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574380 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 21:38:25 +00:00
Michael Stack 223a3e46d0 HADOOP-1784 delete
Previous commit against this issue applied v3 rather than v4.
This commit applies the difference which should fix the currently
broken build.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574376 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 21:16:20 +00:00
Jim Kellerman 5df7ca8c43 HADOOP-1793 Remove deprecated HClient class
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574312 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 17:42:50 +00:00
Michael Stack 2cc1c9f65b HADOOP-1784 Delete: Fix scanners and gets so they work properly in presence
of deletes. Added a deleteAll to remove all cells equal to or older than
passed timestamp.  Fixed compaction so deleted cells do not make it out
into compacted output.  Ensure also that versions > column max are dropped
compacting.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@574287 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 15:56:16 +00:00
Jim Kellerman 361f74c0c2 HADOOP-1801 When hdfs is yanked out from under hbase, hbase should go down gracefully
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@573777 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 03:09:42 +00:00
Jim Kellerman 135670ccf4 HADOOP-1847 Many HBase tests do not fail well. (phase 2)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@573776 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 03:04:54 +00:00
Jim Kellerman 6626ee072a HADOOP-1847 Many HBase tests do not fail well.
HADOOP-1793 (Phase 1) Remove TestHClient

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@573492 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 07:28:42 +00:00
Jim Kellerman 84ef0f95ef HADOOP-1794 Remove deprecated APIs
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@573088 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 22:35:13 +00:00
Michael Stack ea418aebbd HADOOP-1835 Updated Documentation for HBase setup/installation
M    hbase/conf/hbase-env.sh
    Removed JAVA_HOME references.
M    hbase/src/java/org/apache/hadoop/hbase/package.html
    Improved setup instruction


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@572983 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 16:12:39 +00:00
Michael Stack 1d19158ac5 HADOOP-1834 Scanners ignore timestamp passed on creation
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    (addContents): Added overrides that allow specifying a timestamp.
M  src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java
    Made it so test inherits from HBaseTestCase instead of from HBaseClusterTestCase
    so could add in tests that do not use cluster.
    (testTimestampScanning): Added test for hadoop-1834 bug.
    (testTimestamp): Refactored to remove duplicated code.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    (getNext): Make it respect the timestamp set on construction.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
    Removed eclipse yellow flag warnings around empty parens and
    auto-boxing longs.
    (getNext): Make it respect the timestamp set on construction.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@572980 13f79535-47bb-0310-9956-ffa450edef68
2007-09-05 16:00:01 +00:00
Jim Kellerman 49d4f333f4 HADOOP-1832 listTables() returns duplicate tables
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@572826 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 22:26:02 +00:00
Jim Kellerman 844e56e704 HADOOP-1821 Replace all String.getBytes() with String.getBytes("UTF-8")
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571711 13f79535-47bb-0310-9956-ffa450edef68
2007-09-01 06:22:01 +00:00
Jim Kellerman a1689adf0e HADOOP-1760 Use new MapWritable and SortedMapWritable classes from org.apache.hadoop.io
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571350 13f79535-47bb-0310-9956-ffa450edef68
2007-08-31 00:37:46 +00:00
Jim Kellerman aba565a228 HADOOP-1797 Fix NPEs in MetaScanner constructor
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571333 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 22:12:45 +00:00
Jim Kellerman 12a62a6333 HADOOP-1814 TestCleanRegionServerExit fails too often on Hudson
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571332 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 22:09:13 +00:00
Michael Stack 7d48b5f7d5 HADOOP-1800 [hbaseshell] output should default utf8 encoding
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ConsoleTable.java
    Make a PrintStream that outputs utf8. Have all printing use it.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/SelectCommand.java
    Fix few places where we make Strings w/o stipulating UTF-8 encoding.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@571317 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 21:28:25 +00:00
Michael Stack 59825ac875 HADOOP-1785 TableInputFormat.TableRecordReader.next has a bug
M  src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTableMapReduce.java
    (localTestSingleRegionTable, localTestMultiRegionTable, verify): Added.
M  src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    Javadoc for addContents and Loader interface and implementations.
    Methods have been made static so accessible w/o subclassing.
M  src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java
    Guts of TestSplit has been moved here so other tests can have
    access to a multiregion table.
M  src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestSplit.java
    Bulk moved to MultiRegionTable utility class.  Use this new class
    instead.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java
    Added '@deprecated' javadoc.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    Was throwing RuntimeException when a msgQueue.put was interrupted
    but this is a likely event on shutdown.  Log a message instead.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
    Actually fix for HADOOP-1785... reverse test of row comparison.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@570983 13f79535-47bb-0310-9956-ffa450edef68
2007-08-29 23:39:52 +00:00
Jim Kellerman 5dc1ee32c0 HADOOP-1805 Region server hang on exit
Catch runtime exceptions in HMemcacheScanner constructor to ensure that read lock is released.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@570918 13f79535-47bb-0310-9956-ffa450edef68
2007-08-29 20:06:41 +00:00
Jim Kellerman 660bce1d27 HADOOP-1797 Fix NPEs in MetaScanner constructor
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@570583 13f79535-47bb-0310-9956-ffa450edef68
2007-08-28 22:08:56 +00:00
Jim Kellerman f56ee6b375 HADOOP-1757 Bloomfilters: single argument constructor, use enum for bloom filter types
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@570270 13f79535-47bb-0310-9956-ffa450edef68
2007-08-27 23:35:15 +00:00
Michael Stack e9aafde1f1 HADOOP-1780 Regions are still being doubly assigned
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    Fix outputing fail message on each compaction though there was none.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    (rename): Refactor so return only happens on end..
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    (assignRegions): Make synchronized.  In presence of concurrent visits
    by regionservers, both visiting threads could grab same set of regions
    for assignment.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@569589 13f79535-47bb-0310-9956-ffa450edef68
2007-08-25 00:42:45 +00:00
Michael Stack 07224fe303 HADOOP-1768 Hbase shell FS command using Hadoop FsShell operations
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java
    Add mention of new 'fs' operator.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/FsCommand.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj
    Added support of new 'fs' operator.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java
    Generated files.  Changes come of mods to HBaseShell.jj
    


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@569484 13f79535-47bb-0310-9956-ffa450edef68
2007-08-24 19:32:29 +00:00
Michael Stack 5e3c5037b4 HADOOP-1776 Fix for sporadic compaction failures closing and moving compaction
result

M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConnectionManager.java
    Minor fix of a log message.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    (COMPACTION_DIR, WORKING_COMPACTION): Removed.
    (compactdir): Renamed compactionDir.
    Removed from constructor our checking if a compaction was left undone.
    Instead, just ignore it.  When compaction reruns whatever as left on 
    filesystem will just be cleaned up and we'll rerun the compaction 
    (Likelihood of a crash mid-compaction in exactly the area where
    the compaction was recoverable are low -- more robust just redoing
    the compaction from scratch).
    (compactHelper): We were deleting HBaseRoot/compaction.tmp dir
    after a compaction completed. Usually fine but on a cluster of
    more than one machine, if two compactions were near-concurrent, one
    machine could remove the compaction working directory while another
    was mid-way through its compaction.  Result was odd failures
    during compaction of result file, during the move of the resulting
    compacting file or subsequently trying to open reader on the
    resulting compaction file (See HADOOP-1765).
    a region fsck tool).
    (getFilesToCompact): Added.
    (processReadyCompaction): Added.  Reorganized compaction so that the
    window during which loss-of-data is possible is narrowed and even
    then, we log a message with how a restore might be performed manually
    (TODO: Add a repair tool).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    (rename): More checking around rename that it was successful.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
    An empty-log gives HLog trouble.  Added handling.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    Cleanup of debug level logging.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java
    Minor javadoc and changed a log from info to debug.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@569446 13f79535-47bb-0310-9956-ffa450edef68
2007-08-24 16:24:40 +00:00
Jim Kellerman 1756a22f03 HADOOP-1746 Clean up findbugs warnings
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@568776 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 23:59:30 +00:00
Jim Kellerman ccd9248e63 HADOOP-1527 Region server won't start because logdir exists
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@568700 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 16:59:43 +00:00
Michael Stack ec2d29c902 HADOOP-1747 On a cluster, on restart, regions multiply assigned
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    Removed some empty lines so I can squeeze more code into a screenful.
    (assignedRegions): Factored out some code into own methods so
    this method is made a bit shorter.  Added early returns near
    top -- if nothing to assign, etc. -- so less nesting.
    Added fix: Instead of iterating over unassignedRegions after
    all the loadings have been calculated, instead iterate over
    the locally calculated  map, regionsToAssign (Otherwise, we
    were running over the same territory each time through the
    loop and were thus giving out same region multiple times).
    (regionsPerServer, assignRegionsToOneServer,
      getRegionsToAssign): Added.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@568404 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 04:05:08 +00:00
Michael Stack e41859593b HADOOP-1737 Make HColumnDescriptor data publically members settable
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
  Use new HColumnDescriptor accessors rather than make direct accesses
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
  (COMPRESSION_NONE, COMPRESSION_RECORD, COMPRESSION_BLOCK): Removed.
  Use enum ordinals instead. Removed mapping between these defines and
  enum equivalents. Made data members private and added accessors.
  (DEFAULT_IN_MEMORY, DEFAULT_COMPRESSION_TYPE,
  DEFAULT_BLOOM_FILTER_DESCRIPTOR, DEFAULT_MAX_VALUE_LENGTH): Added.
M hbase/src/test/org/apache/hadoop/hbase/TestToString.java
  Fix because enum strings are upper-case (was expecting lowercase).


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@568275 13f79535-47bb-0310-9956-ffa450edef68
2007-08-21 20:53:24 +00:00
Jim Kellerman 4ebd558b41 HADOOP-1723 If master asks region server to shut down, by-pass return of shutdown message
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@567864 13f79535-47bb-0310-9956-ffa450edef68
2007-08-20 22:35:27 +00:00
Michael Stack 00c1b877e8 HADOOP-1730 unexpected null value causes META scanner to exit (silently)
Added handling for legal null value scanning META table and added
logging of unexpected exceptions that arise scanning.

M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestSplit.java
    Refactored to do a staged removal of daughter references.
    (compact, recalibrate): Added.
    (getSplitParent): Refactored as getSplitParentInfo.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConnectionManager.java
    Added formatting of the find table result string so shorter
    (when 30-odd regions fills page with its output).
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java
    Formatting to clean eclipse warnings.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    The split column in a parent meta table entry can be null (Happens
    if a daughter split no longer has references -- it removes its
    entry from parent).  Add handling and clean up around split
    management code.  Added logging of unexpected exceptions
    scanning a region.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java
    Added fix for NPE when client asks for scanner but passes
    non-existent columns.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/util/Writables.java
    (getHRegionInfo, getHRegionInfoOrNull): Added.:



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@567308 13f79535-47bb-0310-9956-ffa450edef68
2007-08-18 18:04:53 +00:00
Michael Stack 17cc1759fc HADOOP-1729 Recent renaming or META tables breaks hbase shell
M src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj
    Add '.' to list of ID characters.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@567292 13f79535-47bb-0310-9956-ffa450edef68
2007-08-18 16:29:09 +00:00
Jim Kellerman b7f01dce98 HADOOP-1709 Make HRegionInterface more like that of HTable
HADOOP-1725 Client find of table regions should not include offlined, split parents

Changes:

New class MapWritable replaces KeyedData and KeyedDataArrayWritable

HBaseAdmin, HConnectionManager, HMaster, HRegionInterface,
HRegionServer, HTable, TestScanner2:
- getRow returns MapWritable instead of array of KeyedData
- next returns MapWritable instead of array of KeyedData

GroupingTableMap, IdentityTableMap, IdentityTableReduce,
TableInputFormat, TableMap, TableOutputCollector, TableOutputFormat,
TestTableMapReduce:
- use MapWritable instead of KeyedData and KeyedDataArrayWritable


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@566878 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 22:51:03 +00:00
Doug Cutting e220809017 HADOOP-1231. Add generics to Mapper and Reducer interfaces. Contributed by Tom White.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@566798 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 18:45:49 +00:00
Michael Stack 9dedf26b0f HADOOP-1672 HBase Shell should use new client classes
Use HTable and HTableAdmin to do what HClient used (Removed all
references to HClient).



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@566467 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 01:56:29 +00:00
Michael Stack be33a241ce HADOOP-1644 [hbase] Compactions should not block updates
Disentangles flushes and compactions; flushes can proceed while a
compaction is happening.  Also, don't compact unless we hit
compaction threshold: i.e. don't automatically compact on HRegion
startup so regions can come online the faster.

M src/contrib/hbase/conf/hbase-default.xml
    (hbase.hregion.compactionThreashold): Moved to be a hstore property
    as part of encapsulating compaction decision inside hstore.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    Refactored.  Moved here generalized content loading code that can
    be shared by tests.  Add to setup and teardown the setup and removal
    of local test dir (if it exists).
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestCompare.java
    Added test of HStoreKey compare (It works other than one would at
    first expect).
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestSplit.java
    Bulk of content loading code has been moved up into the parent class.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConnectionManager.java
    (tableExists): Restore to a check of if the asked-for table is in list of
    tables.  As it was, a check for tableExists would just wait on all timeouts
    and retries to expire and then report table does not exist..  Fixed up
    debug message listing regions of a table.  Added protection against meta
    table not having a COL_REGINFO (Seen in cluster testing -- probably a bug
    in row removal).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    Loading store files, even if it was noticed that there was no corresponding
    map file, was still counting file as valid.  Also fix merger -- was
    constructing MapFile.Reader directly rather than asking HStoreFile for
    the reader (HStoreFile knows how to do MapFile references)
    (rename): Added check that move succeeded and logging.  In cluster-testing,
    the hdfs move of compacted file into place has failed on occasion (Need
    more info).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    Encapsulate ruling on whether a compaction should take place inside HStore.
    Added reading of the compactionThreshold her.  Compaction threshold is
    currently just number of store files.  Later may include other factors such
    as count of reference files.  Cleaned up debug messages around
    reconstruction log.  Removed compaction if size > 1 from constructor.  Let
    compaction happen after we've been deployed (Compactions that happen while
    we are online can continue to take updates.  Compaction in the constructor
    puts off our being able to take in updates).
    (close): Changed so it now returns set of store files.  This used to be done
    by calls to flush. Since flush and compaction have been disentangled, a
    compaction can come in after flush and the list of files could be off.
    Having it done by close, can be sure list of files is complete.
    (flushCache): No longer returns set of store files.  Added 'merging compaction'
    where we pick an arbitrary store file from disk and merge into it the content
    of memcache (Needs work).
    (getAllMapFiles): Renamed getAllStoreFiles.
    (needsCompaction): Added.
    (compactHelper): Added passing of maximum sequence number if already
    calculated. If compacting one file only, we used skip without rewriting
    the info file.  Fixed.
    Refactored.  Moved guts to new  compact(outFile, listOfStores)  method.
    (compact, CompactionReader): Added overrides and interface  to support
    'merging compaction' that takes files and memcache.  In compaction,
    if we failed the move of the compacted file, all data had already been
    deleted.  Changing, so deletion happens after confirmed move of
    compacted file.
    (getFull): Fixed bug where NPE when read of maps came back null.
    Revealed by our NOT compacting stores on startup.  Meant could be two
    backing stores one of which had no data regards queried key.
    (getNMaps): Renamed countOfStoreFiles.
    (toString): Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
    Added comment on 'odd'-looking comparison.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
    Javadoc edit. 
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogEdit.java
    Only return first 128 bytes of value when toStringing (On cluster,
    was returning complete web pages in log).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    Removed confusing debug message (made sense once -- but not now).
    Test rootRegionLocation for null before using it (can be null).
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
    Added comment that delete behavior needs study.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java
    Fixed merge so it doesn't do the incremental based off files
    returned by flush.  Instead all is done in the one go after
    region closes (using files returned by close).
    Moved duplicated code to new filesByFamily method.
    (WriteState): Removed writesOngoing in favor of compacting and
    flushing flags.
    (flushCache): No longer returns list of files.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/util/Writables.java
    Fix javadoc.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@566459 13f79535-47bb-0310-9956-ffa450edef68
2007-08-16 01:07:51 +00:00
Jim Kellerman 6c8e713671 HADOOP-1711 HTable API should use interfaces instead of concrete classes as method parameters and return values
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@566291 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 18:20:53 +00:00
Jim Kellerman 391379a6fb HADOOP-1710 All updates should be batch updates
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@565993 13f79535-47bb-0310-9956-ffa450edef68
2007-08-15 01:12:29 +00:00
Jim Kellerman 0c7ac6795f HADOOP-1678 On region split, master should designate which host should serve daughter splits. Phase 2: Master assigns children of split region instead of HRegionServer serving both children.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@565616 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 03:37:01 +00:00
Jim Kellerman 931d452cb2 HADOOP-1678 On region split, master should designate which host should serve daughter splits.
Phase 1: Master balances load for new regions and when a region server fails.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@564780 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 22:11:05 +00:00
Michael Stack 790e3d767e HADOOP-1662 Make region splits faster
Splits are now near-instantaneous.  On split, daughter splits create
'references' to store files up in the parent region using new 'HalfMapFile'
class to proxy accesses against the top-half or bottom-half of 
backing MapFile.  Parent region is deleted after all references in daughter
regions have been let go.

Below includes other cleanups and at least one bug fix for fails adding
>32k records and improvements to make it more likely TestRegionServerAbort
will complete..

A src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
    Added. Tests new Reference HStoreFiles. Test new HalfMapFileReader inner
    class of HStoreFile. Test that we do the right thing when HStoreFiles
    are smaller than a MapFile index range (i.e. there is not 'MidKey').
    Test we do right thing when key is outside of a HalfMapFile.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestGet.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestScanner.java
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTimestamp.java
    getHRegionDir moved from HStoreFile to HRegion.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestBatchUpdate.java
    Let out exception rather than catch and call 'fail'.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java
    Refactored so can start and stop a minihbasecluster w/o having to
    subclass this TestCase. Refactored methods in this class to use the
    newly added methods listed below.
    (MasterThread, RegionServerThread, startMaster, startRegionServers
      shutdown): Added.
    Added logging of abort, close and wait.  Also on abort/close
    was doing a remove that made it so subsequent wait had nothing to
    wait on.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestSplit.java
    Added tests that assert all works properly at region level on
    multiple levels of splits and then do same on a cluster.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java
    Removed catch and 'fail()'.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    Javadoc to explain how split now works. Have constructors flow
    into each other rather than replicate setup per instance. Moved
    in here operations such as delete, rename, and length of store files
    (No need of clients to remember to delete map and info files).
    (REF_NAME_PARSER, Reference, HalfMapFile, isReference,
      writeReferenceFiles, writeSplitInfo, readSplitInfo,
      createOrFail, getReader, getWriter, toString): Added.
    (getMapDir, getMapFilePath, getInfoDir, getInfoFilePath): Added
    a bunch of overrides for reference handling.
    (loadHStoreFiles): Amended to load references off disk.
    (splitStoreFiles): Redone to instead write references into
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    Rename maps as readers and mapFiles as storefiles.
    Moved BloomFilterReader and Writer into HStoreFile. Removed
    getMapFileReader and getMapFileWriter (They are in HStoreFile now).
    (getReaders): Added.
    (HStoreSize): Added.  Data Structure to hold aggregated size
    of all HStoreFiles in HStore, the largest, its midkey, and
    if the HStore is splitable (May not be if references).
    Previous we only did largest file; less accurate.
    (getLargestFileSize): Renamed size and redone to aggregate
    sizes, etc.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
    Have constructors waterfall down through each other rather than
    repeat initializations.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMerge.java
    Use new HStoreSize structure.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
    Added delayed remove of HRegion (Now done in HMaster as part of
    meta scan). Change LOG.error and LOG.warn so they throw stack trace
    instead of just the Exception.toString as message.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HConstants.java
    (COLUMN_FAMILY_STR): Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
    Added why to log of splitting.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLogEdit.java
    Short is not big enough to hold edits tha could contain a sizable
    web page.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java
    (getTableName): Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    Added constructor to BaseScanner that takes name of table we're
    scanning (ROOT or META usually). Added to scanOneRegion handling
    of split regions.  Collect splits to check while scanning and
    then outside of the scanning, so we can modify the META table
    is needed, do the checks of daughter regions and update on
    change of state.  Made LOG.warn and LOG.error print stack trace.
    (isSplitParent, cleanupSplits, hasReferences): Added. 
    Added toString to each of the PendingOperation implementations.
    In the ShutdownPendingOperation scan of meta data, removed
    check of startcode (if the server name is that of the dead
    server, it needs reassigning even if start code is good).
    Also, if server name is null -- possible if we are missing
    edits off end of log -- then the region should be reassigned
    just in case its from the dead server.  Also, if reassigning,
    clear from pendingRegions.  Server may have died after sending
    region is up but before the server confirms receipt in the
    meta scan. Added mare detail to each log.  In OpenPendingOperation
    we were trying to clear pendingRegion in wrong place -- it was
    never executed (regions were always pending). 
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
    Add split boolean.  Output offline and split status in toString.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
    Comments.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java
    Moved getRegionDir here from HStoreFile.
    (COL_SPLITA, COL_SPLITB): Added.
    (closeAndSplit): Refactored to use new fast split method.
       StringUtils.formatTimeDiff(System.currentTimeMillis(), startTime));
    (splitStoreFile): Moved into HStoreFile.
    (getSplitRegionDir, getSplitsDir, toString): Added.
    (needsSplit): Refactored to exploit new HStoreSize structure.
    Also manages notion of 'unsplitable' region.
    (largestHStore): Refactored.
    (removeSplitFromMETA, writeSplitToMETA, getSplit, hasReference): Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/util/Keying.java
    (intToBytes, getBytes): Added.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/util/Writables.java    
    Utility reading and writing Writables.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@564012 13f79535-47bb-0310-9956-ffa450edef68
2007-08-08 20:30:13 +00:00
Jim Kellerman b205cac36d HADOOP-1466 Clean up warnings, visibility and javadoc issues in HBase.
Works in my environment. Since no changes were made to the code aside from white space adjustment, not testing with Hudson.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@562608 13f79535-47bb-0310-9956-ffa450edef68
2007-08-03 22:39:43 +00:00
Jim Kellerman 4fa87a0cbb HADOOP-1528 HClient for multiple tables - expose close table function
HTable

    * added public method close
    * added protected method checkClosed
    * make getConnection public

HConnectionManager

    * a call to getTableServers or reloadTableServers will cause information for closed
      tables to be reloaded

TestHTable

    * new test case


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@562294 13f79535-47bb-0310-9956-ffa450edef68
2007-08-03 00:02:19 +00:00
Jim Kellerman 84ef0ba801 HADOOP-1528 HClient for multiple tables (phase 2) all HBase client side code
(except TestHClient and HBaseShell) have been converted to use the new client
side objects (HTable/HBaseAdmin/HConnection) instead of HClient.

HBaseAdmin
- Expose connection methods getMaster, isMasterRunning and listTables



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@562041 13f79535-47bb-0310-9956-ffa450edef68
2007-08-02 08:15:26 +00:00
Jim Kellerman 2bbcc5a122 HADOOP-1528 HClient for multiple tables (phase 1)
Modified:

HConstants
static final Text[] COL_REGIONINFO_ARRAY = new Text [] {COL_REGIONINFO};
static final Text EMPTY_START_ROW = new Text();

HMaster
- don't process a region server exit message if the lease has timed
  out. Otherwise we end up with two pending server shutdown messages
  to process and chaos ensues.
- don't reassign the root region when the server's lease expires. The
  lease expiration handler will queue a PendingServerShutdown
  operation that must run before the root region is reassigned because
  the HLog of the dead server must be split before any regions served
  by the dead server are reassigned.
- added some additional debug level logging

HBaseClusterTestCase
- call HConnectionManager.deleteConnection(conf) in tearDown() so that
  multiple tests can be run from the same test class.

TestScanner2
- changes to make test compatible with the change from inner class
  HClient.RegionLocation to public class HRegionLocation

Leases
- cancelLease just returns if the lease is not found instead of
  throwing an IOException

New:

HConnection - an interface that describes the operations performed by
a connection implementation

HConnectionManager - manages connections for multiple HBase instances
and returns an object that implements HConnection from its static
method getConnection

HBaseAdmin - the HBase administrative methods refactored out of
HClient. Each HBaseAdmin object can control a single HBase
instance. To manipulate multiple instances, create multiple HBaseAdmin
objects. 

HTable - The data manipulation methods refactored out of HClient. Each
HTable object talks to a single table in a single HBase
instance. Create multiple HTable objects to use more than one table.

HRegionLocation - an inner class refactored out of HClient. Each
HRegionLocation has an HRegionInfo object and an HServerAddress
object.

HClient - totally re-implemented in terms of the new classes
above. HClient is now deprecated.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@561935 13f79535-47bb-0310-9956-ffa450edef68
2007-08-01 20:10:11 +00:00
Jim Kellerman a9acbeab08 HADOOP-1468 Add HBase batch update to reduce RPC overhead (restrict batches to a single row at a time)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@560014 13f79535-47bb-0310-9956-ffa450edef68
2007-07-26 21:58:22 +00:00
Michael Stack 5b1bd1f8f2 HADOOP-1646 RegionServer OOME's under sustained, substantial loading by
10 concurrent clients


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@559993 13f79535-47bb-0310-9956-ffa450edef68
2007-07-26 21:30:55 +00:00
Jim Kellerman 5f850fcee4 HADOOP-1516 HClient fails to readjust when ROOT or META redeployed on new region server
Detailed changes:

MiniHBaseCluster
- rewrite abortRegionServer, stopRegionServer - they now remove the
  server from the map of servers.
- rewrite waitOnRegionServer - now removes thread from map of threads

TestCleanRegionServerExit
- reduce Hadoop ipc client timeout and number of retries
- use rewritten stopRegionServer and waitOnRegionServer from MiniHBaseCluster
- add code to verify that failover worked
- moved testRegionServerAbort to separate test file

TestRegionServerAbort
- new test. Uses much the same code as TestCleanRegionServerExit but
  aborts the region server instead of shutting it down
  cleanly. Includes code to verify that failover worked.

hbase-site.xml (in src/contrib/hbase/src/test)
- reduce master lease timeout and time between lease timeout checks so
  that tests will run quicker.

HClient
- Major restructing of code that determines what region server to
  contact for a specific region. The main method findServersForTable
  is now recursive so that it will find the meta and root regions if
  they have not already been located or will re-find them if they have
  been reassigned and the old server can no longer be contacted.
- re-ordered administrative and general purpose methods so they are no
  longer located in seemingly random order.
- re-ordered code in ClientScanner.loadRegions so that if the location
  of the region changes, it will actually try to connect to the new
  server rather than continually trying to use the connection to the
  old server.

HLog
- use HashMap<Text, SequenceFile.Writer> instead of 
  TreeMap<Text, SequenceFile.Writer> because the TreeMap would return
  a value for a key it did not have (it was the value of another
  key). I have observed this before when the key is Text, but could
  not create a simple test case that reproduced the problem.
- added some new DEBUG level logging
- removed call to rollWriter() from closeAndDelete(). We don't need to
  start a new writer if we are closing the log.

HLogKey
- cleaned up per HADOOP-1466 (I initially modified it to add some
  debug logging which was later removed, but when I was making the
  modifications I took the opportunity to clean up the file)
- changed toString() format

HMaster
- better handling of RemoteException
- modified BaseScanner
 - now knows if it is scanning the root or a meta region
 - scanRegion no longer returns a value
 - if scanning the root region, it counts the number of meta regions
   it finds and sets a new AtomicInteger, numberOfMetaRegions when the
   scan is complete.
 - added abstract methods initialScan and maintenanceScan this allowed
   run method to be implemented in the base class.
- boolean rootScanned is now volatile
- modified RootScanner
 - moved actual scan into private method for readability (scanRoot)
 - implementation of abstract methods just call scanRoot
- add constructor for inner static class MetaRegion
- use a BlockingQueue to queue up work for the MetaScanner
- clean up handling of an unexpected region server exit
- PendingOperation.process now returns a boolean so that HMaster.run
  can determine if the operation completed or needs to be retried later
- PendingOperation processing no longer does a wait inside the process
  method since this might cause a deadlock if the current operation is
  waiting for another operation that has yet to be processed

HMsg
- removed MSG_REGIONSERVER_STOP_IN_ARRAY, MSG_NEW_REGION
- added MSG_REPORT_SPLIT

HRegionServer
- changed reportSplit to contain old region and new regions
- use IP from default interface rather than host name
- abort calls HLog.close() instead of HLog.rollWriter()



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@559819 13f79535-47bb-0310-9956-ffa450edef68
2007-07-26 14:15:17 +00:00
Michael Stack 43e253359a HADOOP-1637 ] Fix to HScanner to Support Filters, Add Filter Tests to
TestScanner2


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@558897 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 23:33:05 +00:00
Michael Stack 377bf72458 HADOOP-1579 Add new WhileMatchRowFilter and StopRowFilter filters
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@558867 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 21:33:47 +00:00
Michael Stack 915add567f HADOOP-1606 Updated implementation of RowFilterSet, RowFilterInterface
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@558243 13f79535-47bb-0310-9956-ffa450edef68
2007-07-21 05:06:13 +00:00
Jim Kellerman bf798cca50 HADOOP-1615 Replacing thread notification-based queue with java.util.concurrent.BlockingQueue in HMaster, HRegionServer
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@557118 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 02:26:03 +00:00
Michael Stack 6a64ae1542 HADOOP-1616 [hbase] Sporadic TestTable failures
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@557098 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 00:38:58 +00:00
Jim Kellerman cbb844d5f0 HADOOP-1468 Add HBase batch update to reduce RPC overhead
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556754 13f79535-47bb-0310-9956-ffa450edef68
2007-07-16 22:19:59 +00:00
Jim Kellerman 5463de47b3 HADOOP-1614 [hbase] HClient does not protect itself from simultaneous updates
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556359 13f79535-47bb-0310-9956-ffa450edef68
2007-07-15 00:26:15 +00:00
Michael Stack 4ed118700d HADOOP-1607 [hbase shell] Clear screen command.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ClearCommand.java
    Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj
    Add 'clear' command handling.
    (clearCommand): Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java
    Add 'clear' command handling (Generated by javacc).
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java
    Add 'CLEAR' help.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpManager.java
    Clear screen before outputting version string.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556356 13f79535-47bb-0310-9956-ffa450edef68
2007-07-14 23:53:39 +00:00
Michael Stack 8c14bab2c4 HADOOP-1581 HBASE: Un-openable tablename bug
Change format of region names from TABLENAME_STARTROW_ENDROW-RANDOMID
to TABLENAME,STARTROW,ENDROW-RANDOMID. Makes it so lone table name will
sort before any region of said table.
M src/contrib/hbase/src/test/hbase-site.xml
  (hbase.client.retries.number): Removed. Wasdefault value for this property.
  (hbase.master.meta.thread.rescanfrequency, hbase.server.thread.wakefrequency,
   hbase.regionserver.handler.count): Add values that are less than
  default so unit tests are even more responsive (and finished quicker).
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestToString.java
  Change test so it expects region info name that has ',' delimiters
  rather than '_' delimiters.
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTable.java
  Rename testTable as testCreateTable.
  (testTableNameClash): Test for this issue.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
  Change format of region names so delimiter is ',' rather than '_'.



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556348 13f79535-47bb-0310-9956-ffa450edef68
2007-07-14 22:25:32 +00:00
Michael Stack cf67022394 HADOOP-1574 Concurrent creates of a table named 'X' all succeed
Actually add the below file.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/TableExistsException.java
    Added.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556335 13f79535-47bb-0310-9956-ffa450edef68
2007-07-14 20:17:58 +00:00
Michael Stack 14dd64dace HADOOP-1574 Concurrent creates of a table named 'X' all succeed
M src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestTable.java
    (testTable): Add checking of actual exceptions thrown and
    assertions that we are getting right behavior.  Add a test
    that has ten clients concurrently trying to create same table.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
    javadoc edit. Fix debug message that could give impression
    table was found when it wasn't.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
    Added comment on table nameing.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    (createTable): Refactored. Bulk moved to a private override.
    Changed how check for existance is done.
M rc/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
    (getTableNameFromRegionName): Utility method added.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/TableExistsException.java
    Added.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@556334 13f79535-47bb-0310-9956-ffa450edef68
2007-07-14 20:08:01 +00:00
Jim Kellerman d14fa81891 HADOOP-1589 Exception handling in HBase is broken over client server
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@555813 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 23:22:20 +00:00
Jim Kellerman c6bf382ebe HADOOP-1600 Update license in HBase code
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@555791 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 22:08:25 +00:00
Doug Cutting 19d1b8ea36 HADOOP-1598. Fix license headers. Contributed by Enis Soztutar.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@555744 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 20:20:53 +00:00
Michael Stack 87f5d5dffd HADOOP-1375 a simple parser for hbase
M src/contrib/hbase/NOTICE.txt
    Add notice of udanax contributions.
Msrc/contrib/hbase/conf/hbase-default.xml
    (hbaseshell.jline.bell.enabled): Added.
M src/contrib/hbase/CHANGES.txt
    (hadoop-1375) Added.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html
    Add note on how to start up hbase shell
M src/contrib/hbase/bin/hbase
    Add 'shell'.  Remove 'client' (shell does what it used do and more).
    Removed all reader and logreader until better developed.  Starting
    up a reader or logreader on a running hbase system could do damage).
M src/contrib/hbase/build.xml
    Add a javacc target to generate content of shell/generated subpackage.
A src/contrib/hbase/src/test/org/apache/hadoop/hbase/shell/TestHBaseShell.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DeleteCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CreateCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DropCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/InsertCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/CommandFactory.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ExitCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ConsoleTable.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DescCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/SelectCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/Command.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ShowCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/BasicCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpManager.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/ReturnMsg.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpCommand.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HBaseShell.jj
    Added.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Token.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/TokenMgrError.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/SimpleCharStream.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParseException.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java
    Added javacc generated files.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@555415 13f79535-47bb-0310-9956-ffa450edef68
2007-07-11 21:54:15 +00:00
Jim Kellerman f613907a98 Exception handling in HBase is broken over client server connections
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@555282 13f79535-47bb-0310-9956-ffa450edef68
2007-07-11 14:23:00 +00:00
Jim Kellerman eaf0a7b154 HADOOP-1538 Provide capability for client specified time stamps in HBase
HADOOP-1466 Clean up visibility and javadoc issues in HBase.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@554811 13f79535-47bb-0310-9956-ffa450edef68
2007-07-10 03:06:32 +00:00
Jim Kellerman 2e49c9451b HADOOP-1415 Provide configurable per-column bloom filters.
HADOOP-1466 Clean up visibility and javadoc issues in HBase.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@554144 13f79535-47bb-0310-9956-ffa450edef68
2007-07-07 06:09:25 +00:00
Michael Stack a3073cc6da HADOOP-1566 [hbase] Key-making utility
A    src/java/org/apache/hadoop/hbase/util/Keying.java
A    src/test/org/apache/hadoop/hbase/util/TestKeying.java
    Added.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@553623 13f79535-47bb-0310-9956-ffa450edef68
2007-07-05 20:12:37 +00:00
Michael Stack 73183e6b97 HADOOP-1531 Add RowFilter to HRegion.HScanner.
Adds a row/column filter interface and two implementations: A pager and a
row/column-value regex filter.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInterface.java
    (openScanner): Add override that specifies a row fliter.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
    (obtainScanner): Add override that specifies a row fliter.
    (ColumnScanner): Add filter parameter to constructor.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegion.java
    (getScanner): Add override with filter parameter.
    (next): Add handling of filtering.
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/InvalidRowFilterException.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/RegExpRowFilter.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/RowFilterSet.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/PageRowFilter.java
A src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/RowFilterInterface.java
    Row-filter interface, exception and implementations.
A src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java
A src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java
    Simple pager and regex filter tests.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@553620 13f79535-47bb-0310-9956-ffa450edef68
2007-07-05 19:50:04 +00:00
Jim Kellerman 9eb369c266 HADOOP-1560 NPE in MiniHBaseCluster on Windows
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@553080 13f79535-47bb-0310-9956-ffa450edef68
2007-07-04 04:48:18 +00:00
Michael Stack 655728f3bf HADOOP-1523 'Hung region servers waiting on write locks'
On shutdown, region servers and masters were just cancelling leases
without letting 'lease expired' code run -- code to clean up
outstanding locks in region server.  Outstanding read locks were
getting in the way of region server getting necessary write locks
needed for the shutdown process.  Also, cleaned up messaging around
shutdown so its clean -- no timeout messages as region servers try
to talk to a master that has already shutdown -- even when region
servers take their time going down.
M src/contrib/hbase/conf/hbase-default.xml
    Make region server timeout 30 seconds instead of 3 minutes.
    Clients retry anyways. Make so its likely region servers report
    in their shutdown message before their lease expires on master.
M src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java
    (closeAfterLeasesExpire): Added.
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
    Added comments.
    (stop): Converted from public to default access (master shuts
    down regionservers).
    (run): Use leases.closeAfterLeasesExpire instead of leases.close.
    Changed log of main thread exit from DEBUG to INFO.
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    (letRegionsServersShutdown): Add better explaination of shutdown
    process to method doc.  Changed timeout waits from
    hbase.regionserver.msginterval to threadWakeFrequency.
    (regionServerReport): If closing, we used to immediately respond
    to region server with a MSG_REGIONSERVER_STOP.  This meant that
    we avoided handling of the region servers MSG_REPORT_EXITING sent
    on shutdown so region servers had no chance to cancel their lease
    in the master.  Reordered.  Moved sending of MSG_REGIONSERVER_STOP
    to after handling of MSG_REPORT_EXITING.  Also, in handling of
    MSG_REGIONSERER_STOP removed cancelling of leases.  Let leases
    expire normally (or get cancelled when the region server comes in
    with MSG_RPORT_EXITING).
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java
    (MSG_REGIONSERVER_STOP_IN_ARRAY): Added.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@552376 13f79535-47bb-0310-9956-ffa450edef68
2007-07-02 00:47:13 +00:00
Jim Kellerman 60a2e629d1 HADOOP-1519 map/reduce interface for HBase
AbstractMergeTestBase, HBaseTestCase: move createNewHRegion to HBaseTestCase
MiniHBaseCluster: add deleteOnExit, getDFSCluster, fix Javadoc
TestScanner2: moved KeyedData to org.apache.hadoop.hbase.io
TestTableMapReduce: new test case to test map/reduce interface to HBase
hbase-site.xml: change hbase.client.pause from 3 to 5 seconds, hbase.client.retries.number to 5 so that tests will not time out or run out of retries
HClient: moved KeyedData to org.apache.hadoop.hbase.io, fix javadoc, add method getStartKeys
HMaster: moved KeyedData to org.apache.hadoop.hbase.io, remove unused variables, remove extraneous throws clause, 
HRegionInterface, HRegionServer: moved KeyedData to org.apache.hadoop.hbase.io
KeyedData: moved KeyedData to org.apache.hadoop.hbase.io
KeyedDataArrayWritable: new class to support HBase map/reduce
org.apache.hadoop.hbase.mapred: new classes for map/reduce
- GroupingTableMap
- IdentityTableMap
- IdentityTableReduce
- TableInputFormat
- TableMap
- TableOutputCollector
- TableOutputFormat
- TableReduce
- TableSplit
hbase/bin/hbase: changes for map/reduce


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@552127 13f79535-47bb-0310-9956-ffa450edef68
2007-06-30 11:11:32 +00:00
Michael Stack 96c64712e6 HADOOP-1543 [base] Add HClient.tableExists
M    src/java/org/apache/hadoop/hbase/HClient.java
    (tableExists): Added
M    CHANGES.txt
M    src/java/org/apache/hadoop/hbase/package.html
    Fix javadoc.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@551725 13f79535-47bb-0310-9956-ffa450edef68
2007-06-28 22:29:07 +00:00
Jim Kellerman 2fa16d4fdf HADOOP-1537. Catch exceptions in testCleanRegionServerExit so we can see what is failing.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@551361 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 22:37:07 +00:00
Michael Stack a31d0e5f31 HADOOP-1534. [hbase] Memcache scanner fails if start key not present
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
    (findFirstRow): Change compare from startsWith -- looking for
    an 'exact' match -- to instead use compareTo and if >= 0, then
    we are at first key.
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
    Add logging of problematic directory if server won't start because
    log file exists.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@551039 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 04:50:10 +00:00
Jim Kellerman 6455364281 HADOOP-1509 Open HRegionServer/HClient for extension
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@550634 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 22:54:56 +00:00
Doug Cutting 31a8ba569b HADOOP-1511. Speed up hbase unit tests. Contributed by stack.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@549605 13f79535-47bb-0310-9956-ffa450edef68
2007-06-21 20:40:45 +00:00
Doug Cutting d1f85d739e HADOOP-1147. Remove @author tags from Java source files.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@549284 13f79535-47bb-0310-9956-ffa450edef68
2007-06-20 22:46:06 +00:00
Doug Cutting 2447ce1922 HADOOP-1498. Add file missed in prior commit.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@548794 13f79535-47bb-0310-9956-ffa450edef68
2007-06-19 16:40:59 +00:00
Doug Cutting eef130fc91 HADOOP-1498. Replace boxed types with primitives in many places. Contributed by stack.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@548523 13f79535-47bb-0310-9956-ffa450edef68
2007-06-18 22:59:14 +00:00
Jim Kellerman f503143412 Provide configurable per-column bloom filters - part 2.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@547468 13f79535-47bb-0310-9956-ffa450edef68
2007-06-15 00:39:34 +00:00
Jim Kellerman e78644ed10 HADOOP-1465 Add cluster stop/start scripts for hbase
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@547427 13f79535-47bb-0310-9956-ffa450edef68
2007-06-14 22:08:56 +00:00
Jim Kellerman 13c1e48253 HADOOP-1415 Integrate BSD licensed bloom filter implementation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@547159 13f79535-47bb-0310-9956-ffa450edef68
2007-06-14 07:40:49 +00:00
Jim Kellerman cc8d45bd47 HADOOP-1469 Asychronous table creation
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@546635 13f79535-47bb-0310-9956-ffa450edef68
2007-06-12 21:08:27 +00:00
Jim Kellerman 0dd5f2759e HADOOP-1476 Distributed version of 'Performance Evaluation' script
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@546320 13f79535-47bb-0310-9956-ffa450edef68
2007-06-11 23:41:48 +00:00
Jim Kellerman 3f5229c66f HADOOP-1479 Fix NPE in HStore#get if store file only has keys < passed key.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@546275 13f79535-47bb-0310-9956-ffa450edef68
2007-06-11 20:52:29 +00:00
Jim Kellerman 09cf0a100f HADOOP-1421 HADOOP-1466 When a region server dies, its log file must be split up on a per region basis
so that region servers are assigned the regions have a log to apply edits from. Enhance fail over 
capabilities. 

For all the files modified, clean up javadoc, class method and field visibility.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@546192 13f79535-47bb-0310-9956-ffa450edef68
2007-06-11 16:46:27 +00:00
Jim Kellerman 3509f88c48 HADOOP-1460 On shutdown IOException with complaint 'Cannot cancel lease that is not held'
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@544512 13f79535-47bb-0310-9956-ffa450edef68
2007-06-05 15:11:57 +00:00
Jim Kellerman ac718209e5 HADOOP-1445 Support updates across region splits and compactions
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@544188 13f79535-47bb-0310-9956-ffa450edef68
2007-06-04 17:14:10 +00:00
Jim Kellerman 7c3d11974b HADOOP-1391. Split test case for merge into two so it does not time out in Hudson
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@543862 13f79535-47bb-0310-9956-ffa450edef68
2007-06-03 08:52:06 +00:00
Jim Kellerman 66839c4c17 HADOOP-1391. Part 2 - table compaction via merging adjacent regions that have shrunk.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@543841 13f79535-47bb-0310-9956-ffa450edef68
2007-06-03 05:09:21 +00:00
Jim Kellerman f35462842b HADOOP-1391. Part1: includes create/delete table; enable/disable table; add/remove column.
Patch has been tested locally and a new test has been added for administrative functions.

Still to do: merge regions.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@542592 13f79535-47bb-0310-9956-ffa450edef68
2007-05-29 17:17:44 +00:00
Jim Kellerman e4194e10e5 HADOOP-1430. HBase shutdown leaves regionservers up.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@541463 13f79535-47bb-0310-9956-ffa450edef68
2007-05-24 22:37:26 +00:00
Jim Kellerman 23f836454d HADOOP-1424. TestHBaseCluster fails with IllegalMonitorStateException. Fix regression introduced by HADOOP-1397.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@541095 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 21:30:25 +00:00
Jim Kellerman 19099c98b1 HADOOP-1420, HADOOP-1423. Findbugs changes, remove reference to removed class HLocking that broke main build.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540973 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 15:14:00 +00:00
Jim Kellerman a658989730 HADOOP-1418. HBase miscellaneous: unit test for HClient, client to do 'Performance Evaluation', etc.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540737 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 20:24:22 +00:00
Jim Kellerman e3e22fe37e HADOOP-1403. HBase reliability. Make master and region server more fault tolerant.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540586 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 13:51:10 +00:00
Jim Kellerman 47bf7fd8bb HADOOP-1397. Replace custom hbase locking with java.util.concurrent.locks.ReentrantLock
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540424 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 05:30:07 +00:00
Doug Cutting 356f3919e9 HADOOP-1386. Fix Path to not permit the empty string as a path, as this has lead to accidental file deletion. Instead force applications to use '.' to name the default directory. Contributed by Hairong.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540359 13f79535-47bb-0310-9956-ffa450edef68
2007-05-21 23:30:40 +00:00
Jim Kellerman 8a53c236b9 HADOOP-1404. HBase command-line shutdown failing (Michael Stack)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540323 13f79535-47bb-0310-9956-ffa450edef68
2007-05-21 22:23:03 +00:00
Jim Kellerman ba1ef8c0c3 HADOOP-1402 Fix javadoc warnings in hbase contrib. (Michael Stack)
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@540271 13f79535-47bb-0310-9956-ffa450edef68
2007-05-21 20:35:19 +00:00
Jim Kellerman a6b7be60d6 Hadoop-1384
HBase omnibus patch. Contributions by Vuk Ercegovac and Michael Stack.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@539243 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 03:22:54 +00:00
Doug Cutting 3a70f2f97b HADOOP-1341. Fix intermittent failure of HBase unit test caused by deadlock. Contributed by Jim Kellerman.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@537292 13f79535-47bb-0310-9956-ffa450edef68
2007-05-11 21:11:43 +00:00
Doug Cutting add0c0c5a0 HADOOP-1325. First complete, functioning version of HBase. Contributed by Jim Kellerman.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@535970 13f79535-47bb-0310-9956-ffa450edef68
2007-05-07 19:58:53 +00:00
Doug Cutting ec9a568764 HADOOP-1282. Omnibus HBase patch. Improved tests and configuration. Contributed by Jim Kellerman.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@532083 13f79535-47bb-0310-9956-ffa450edef68
2007-04-24 21:13:08 +00:00
Doug Cutting 114d67c614 HADOOP-1148. More indentation and spacing fixes.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@530556 13f79535-47bb-0310-9956-ffa450edef68
2007-04-19 21:34:41 +00:00
Doug Cutting 4a8d243f4e HADOOP-1148. More re-indentation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@529756 13f79535-47bb-0310-9956-ffa450edef68
2007-04-17 20:37:59 +00:00
Thomas White 89af8294f4 HADOOP-1203. Change UpgradeUtilities used by DFS tests to use MiniDFSCluster to start and stop NameNode/DataNodes. Contributed by Nigel Daley.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@526281 13f79535-47bb-0310-9956-ffa450edef68
2007-04-06 21:09:28 +00:00
Doug Cutting 948d0cdec4 HADOOP-1045. Add contrib/hbase, a BigTable-like online database.
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@525267 13f79535-47bb-0310-9956-ffa450edef68
2007-04-03 20:34:28 +00:00