Commit Graph

354 Commits

Author SHA1 Message Date
Michael Stack 589a407f0c HBASE-561 HBase package does not include LICENSE.txt nor build.xml
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@644536 13f79535-47bb-0310-9956-ffa450edef68
2008-04-03 22:39:46 +00:00
Bryan Duxbury 228fd03bac HBASE-71 [hbase] Master should rebalance region assignments periodically
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@644441 13f79535-47bb-0310-9956-ffa450edef68
2008-04-03 19:03:59 +00:00
Jim Kellerman 6e225dd7f1 HBASE-469 Streamline HStore startup and compactions
HMerge, HRegionServer

- changes that reflect changes to HRegion, CompactSplitThread and Flusher methods

ServerManager

- Return zero length array to region server if it is exiting or quiesced and Master is not yet ready to shut down.

QueueEntry

- removed. no longer used.

CompactSplitThread

- make compactionQueue a queue of HRegion.
- Add Set<HRegion> so we can quickly determine if a region is in the queue. BlockingQueue.contains() does a linear scan of the queue.
- Add a lock and interruptPolitely methods so that compactions/splits in progress are not interrupted.
- Don't add a region to the queue if it is already present.

Flusher

- change queue from DelayQueue to BlockingQueue, with HRegion entries instead of QueueEntry.
- Add Set<HRegion> to quickly determine if a region is already in the queue to avoid linear scan of BlockingQueue.contains().
- Only put regions in the queue for optional cache flush if the last time they were flushed is older than now - optionalFlushInterval.
- Only add regions to the queue if it is not already present.

HRegion

- don't request a cache flush if one has already been requested.
- Add setLastFlushTime so flusher can set it once it has queued an optional flush.
- Replace largestHStore with getLargestHStoreSize: returns long instead of HStoreSize object.
- Add midKey as parameter to splitRegion.
- Reorder start of splitRegion so it doesn't do any work before validating parameters.
- Remove needsSplit and compactIfNeeded - no longer needed.
- compactStores now returns midKey if split is needed.
- snapshotMemcaches now sets flushRequested to false and sets lastFlushTime to now.
- update does not request a cache flush if one has already been requested.
- Override equals and hashCode so HRegions can be stored in a HashSet.

HStore

- loadHStoreFiles now computes max sequence id and the initial size of the store.
- Add getter for family.
- internalCacheFlush updates store size, and logs both size of cache flush and resulting map file size (with debug logging enabled).
- Remove needsCompaction and hasReferences - no longer needed.
- compact() returns midKey if store needs to be split.
- compact() does all checking before actually starting a compaction.
- If store size is greater than desiredMaxFileSize, compact returns the midKey for the store regardless of whether a compaction was actually done.
- Added more synchronization in completeCompaction while iterating over storeFiles.
- completeCompaction computes new store size.
- New method checkSplit replaces method size. Returns midKey if store needs to be split and can be split.

HStoreSize

- removed. No longer needed.

HBaseTestCase

- only set fs if it has not already been set by a subclass.

TestTableIndex, TestTableMapReduce

- call FSUtil.deleteFully to clean up cruft left in local fs, by MapReduce


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643761 13f79535-47bb-0310-9956-ffa450edef68
2008-04-02 06:58:26 +00:00
Michael Stack 92a8e04b85 git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643621 13f79535-47bb-0310-9956-ffa450edef68 2008-04-01 22:12:23 +00:00
Michael Stack 6c124cd285 HBASE-548 Tool to online single region
M    branches/0.1/src/java/org/apache/hadoop/hbase/util/MetaUtils.java
M    trunk/src/java/org/apache/hadoop/hbase/util/MetaUtils.java
    (changeOnlineStatus): Added.



git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643486 13f79535-47bb-0310-9956-ffa450edef68
2008-04-01 17:52:46 +00:00
Michael Stack f15048d4d0 HBASE-505 Region assignments should never time out so long as the region
server reports that it is processing the open request

This is patch reviewed with Jim but with the number of edits between
reports made into a configurable.

Have the HRegionServer pass down a Progressable implementation down into
Region and then down int Store where edits are replayed. Call progress
after every couple of thousand edits.

M src/java/org/apache/hadoop/hbase/HStore.java
  Take a Progessable in the constructor. Call it when applying edits.
M src/java/org/apache/hadoop/hbase/HMaster.java
  Update commment around MSG_REPORT_PROCESS_OPEN so its expected
  that we can get more than one of these messages during a region open.
M src/java/org/apache/hadoop/hbase/HRegion.java
  New constructor that takes a Progressable. Pass it to Stores on construction.
M src/java/org/apache/hadoop/hbase/HRegionServer.java
  On open of a region, pass in a Progressable that adds a
MSG_REPORT_PROCESS_OPEN every time its called.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643223 13f79535-47bb-0310-9956-ffa450edef68
2008-04-01 00:09:25 +00:00
Michael Stack 198a156334 HBASE-551 Master stuck splitting server logs in shutdown loop;
on eachiteration, edits are aggregated up into the millions
M src/java/org/apache/hadoop/hbase/HLog.java
    (splitLog): If an exception processing a split, catch it.
    In finally, close and delete the split. Don't try retrying.
    While in some circumstance, we might recover, its also
    likely that we just get same exception again. If so, and
    multiple files, we'll just accumulate edits until the
    kingdom comes.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643142 13f79535-47bb-0310-9956-ffa450edef68
2008-03-31 20:47:47 +00:00
Michael Stack 1197d65839 HBASE-550 EOF trying to read reconstruction log stops region deployment
M CHANGES.txt
    Fix mis-committed changelog.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643113 13f79535-47bb-0310-9956-ffa450edef68
2008-03-31 19:34:09 +00:00
Michael Stack 53a6abfe6e HBASE-550 EOF trying to read reconstruction log stops region deployment
M  src/java/org/apache/hadoop/hbase/HStore.java
    (Constructor) If an exception out of reconstructionLog method, log it and
    keep going.  Presumption is that its result of a lack of HADOOP--1700.
    (reconstructionLog): Check for empty log file.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@643110 13f79535-47bb-0310-9956-ffa450edef68
2008-03-31 19:26:47 +00:00
Michael Stack 46ff7775f6 HBASE-534 Double-assignment at SPLIT-time
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@640625 13f79535-47bb-0310-9956-ffa450edef68
2008-03-24 22:42:14 +00:00
Bryan Duxbury 65d961ae78 HBASE-536 Remove MiniDFS startup from MiniHBaseCluster
-Changed MiniHBaseCluster to not start up a MiniDFS
-Changed HBaseClusterTestCase to do the work of starting up a MiniDFS.
-Added pre and post setup method to HBaseClusterTestCase so you can control what happen before MiniHBaseCluster is booted up
-Converted AbstractMergeTestCase to be a HBaseClusterTestCase
-Converted any test that used a raw MIniDFS or MiniHBaseCluster to use HBaseClusterTestCase instead
-Split TestTimestamp into two tests - one for clientside (now in o.a.h.h.client) and one for serverside (o.a.h.h.regionserver)
-Merged in Stack's changes to make bin/hbase have hadoop jars first on the classpath
-Updated PerformanceEvaluation (in --miniCluster mode) to start up a DFS first
-Fixed a bug in BaseScanner that would have allowed NPEs to be generated


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@640526 13f79535-47bb-0310-9956-ffa450edef68
2008-03-24 19:13:56 +00:00
Jim Kellerman aabe9f09a9 HBASE-476 RegexpRowFilter behaves incorectly when there are multiple store files (Clint Morgan via Jim Kellerman)
HBASE-527   RegexpRowFilter does not work when there are columns from multiple families (Clint Morgan via Jim Kellerman)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@640106 13f79535-47bb-0310-9956-ffa450edef68
2008-03-22 22:35:36 +00:00
Jim Kellerman e7b705a808 HBASE-537 Wait for hdfs to exit safe mode
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@639858 13f79535-47bb-0310-9956-ffa450edef68
2008-03-21 21:31:23 +00:00
Jim Kellerman a9d8d51663 HBASE-531 Merge tool won't merge two overlapping regions (port HBASE-483 to trunk) (See HBASE-483 for list of changes)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@639775 13f79535-47bb-0310-9956-ffa450edef68
2008-03-21 19:46:34 +00:00
Michael Stack 9fa72c0177 HBASE-526 Add documentation src and build to the 0.1 branch
Second part of documentation commit.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@638612 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 22:32:14 +00:00
Bryan Duxbury feb4f2d2b6 HBASE-528 table 'does not exist' when it does
-Changed HStore and Memcache methods for computing closest row at or before
-Added more test cases for verifying this functionality
-Simplified the getClosestRowBefore interface so that it does not take timestamps
-Noted that getClosestRowBefore is assumed to work correctly ONLY on tables where updates are always with ascending timestamps (method is still not a part of HTable interface, so not available to clients)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@638598 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 21:48:22 +00:00
Bryan Duxbury f66e157e5e HBASE-529 RegionServer needs to recover if datanode goes down
-HLog will now try to reopen the log twice on append failure before taking the region server down

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@638597 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 21:44:02 +00:00
Bryan Duxbury ea1ac1f75c HBASE-524 Problems with getFull
-Added new test case to exercise the problems
-Fixed getFull implementation in HStore and Memcache

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@638525 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 19:34:33 +00:00
Bryan Duxbury f8fc7bdd77 HBASE-525 HTable.getRow(Text) does not work
-Fixed broken set initialization in HRegionServer

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@638150 13f79535-47bb-0310-9956-ffa450edef68
2008-03-18 00:13:23 +00:00
Bryan Duxbury 37cf8a8cfb HBASE-506 When an exception has to escape ServerCallable due to exhausted retries, show all the exceptions that lead to this situation
-Updated ServerCallable to track a list of exceptions and report them all when the process runs out of retries

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@637474 13f79535-47bb-0310-9956-ffa450edef68
2008-03-15 21:15:45 +00:00
Michael Stack 9a40223445 HBASE-515 At least double default timeouts between regionserver and master
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@637179 13f79535-47bb-0310-9956-ffa450edef68
2008-03-14 17:47:49 +00:00
Jim Kellerman 5d4ed8436d HBASE-516 HStoreFile.finalKey does not update the final key if it is not the top region of a split region
Modified HStoreFile$HalfMapFileReader.finalKey

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@637002 13f79535-47bb-0310-9956-ffa450edef68
2008-03-14 05:57:54 +00:00
Michael Stack c1f974bbee HBASE-501 Empty region server address in info:server entry and a startcode of -1 in .META.
M conf/hbase-default.xml
Add hbase.hbasemaster.maxregionopen property.
M src/java/org/apache/hadoop/hbase/HStore.java
Change way we log. Do way less. Just emit sums of edits applied
and skipped rather than individual edits.
M src/java/org/apache/hadoop/hbase/HRegionServer.java
Make sleeper instance a local rather than data member.
(reportForDuty): Take a sleeper instance.
(run): Removed redundant wrap of a 'for' by a 'while'.
(constructor): If IOE, do not offline the region. Seen to be
an overreaction.
M src/java/org/apache/hadoop/hbase/HLog.java
Don't output map of all files being cleaned everytime a new
entry is added; instead just log new entry. Remove emission
of every 10k edits.
M src/java/org/apache/hadoop/hbase/HMaster.java
Up default for maxregionopen. Was seeing that playing edits
could take a long time (mostly because we used log every
edit) but no harm in this being longer. On REPORT_CLOSE,
emit region info, not just region so can see the properties
(W/o, made it hard to figure who was responsible for offlining).
Add logging of attempt # in shutdown processing.
Add logging of state flags passed to the close region. Helps
debugging. Also in close offline ONLY if we are NOT reassigning
the region (jimk find).
M src/java/org/apache/hadoop/hbase/util/Sleeper.java
Add logging of extraordinary sleeps or calculated periods
(suspicion is that we're sleeping way longer on loaded machies
and the regionserver appears hung).


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@636849 13f79535-47bb-0310-9956-ffa450edef68
2008-03-13 19:37:21 +00:00
Bryan Duxbury 8c815c72f4 HBASE-443 Move internal classes out of HStore
-Moved out classes Memcache, StoreFileScanner, MapFileCompactionReader, and HStoreScanner, and interface CompactionReader
-Updated TestHMemcache to use the correct type declaration.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@636815 13f79535-47bb-0310-9956-ffa450edef68
2008-03-13 18:06:08 +00:00
Jim Kellerman 9057e559a1 HBASE-27 hregioninfo cell empty in meta table
Summary of changes:

HMaster:

- When a row has an empty HRegionInfo (info:regioninfo), log it with the row name and and the other keys still in the row.

- Log the number of rows with empty HRegionInfo

- Delete the rows

- Make RowMap inner class static, change methods to have package scope to avoid synthetic accessors.

- Provide row name to getHRegionInfo so it can issue better log messages

- add method deleteEmptyMetaRows to remove rows with empty HRegionInfo

HRegion

- change removeRegionFromMETA to use deleteAll rather than using a BatchUpdate containing deletes for each cell.

TestEmptyMetaInfo

- new test case



git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@636589 13f79535-47bb-0310-9956-ffa450edef68
2008-03-13 00:33:13 +00:00
Bryan Duxbury 6fb7767fc6 HBASE-40 [hbase] Add a method of getting multiple (but not all) cells for a row at once
-new override of getRow added to the whole stack
-test for new override added to TestGet2

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@636415 13f79535-47bb-0310-9956-ffa450edef68
2008-03-12 16:58:10 +00:00
Jim Kellerman 082e0237fd HBASE-433 HBASE-251 Region server should delete restore log after successful restore, Stuck replaying the edits of crashed machine.
HLog

- don't overwrite oldlogfile in splitLog if it already exists. Rename it and copy it into the new oldlogfile. Then delete it once it has been copied.
- use FileUtil.fullyDelete to delete region server log directory.

HRegion

- delete oldlogfile once it has been successfully processed


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@636396 13f79535-47bb-0310-9956-ffa450edef68
2008-03-12 16:20:07 +00:00
Michael Stack da6dde97ce HBASE-495 No server address listed in .META.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@634791 13f79535-47bb-0310-9956-ffa450edef68
2008-03-07 19:55:26 +00:00
Michael Stack 57d1bde0e0 HBASE-476 Passing on edits, we dump all to log
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@634443 13f79535-47bb-0310-9956-ffa450edef68
2008-03-06 23:00:37 +00:00
Michael Stack 8de1e7de79 HBASE-496 impossible state for createLease writes 400k lines in about 15mins
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@634395 13f79535-47bb-0310-9956-ffa450edef68
2008-03-06 19:49:54 +00:00
Jim Kellerman a0f73c7efd HBASE-492 hbase TRUNK does not build against hadoop TRUNK
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@634168 13f79535-47bb-0310-9956-ffa450edef68
2008-03-06 05:09:33 +00:00
Michael Stack 36b5f4791f HBASE-490 Doubly-assigned .META.; master uses one and clients another
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@633597 13f79535-47bb-0310-9956-ffa450edef68
2008-03-04 19:25:14 +00:00
Michael Stack ab8b5920a9 HBASE-477 Add support for an HBASE_CLASSPATH
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@633240 13f79535-47bb-0310-9956-ffa450edef68
2008-03-03 19:18:53 +00:00
Michael Stack 4e2efbe801 HBASE-480 Tool to manually merge two regions
Commit to TRUNK and branch.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@632663 13f79535-47bb-0310-9956-ffa450edef68
2008-03-01 22:07:12 +00:00
Jim Kellerman 8aa6130bb4 HBASE-479 Speed up TestLogRolling
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@632533 13f79535-47bb-0310-9956-ffa450edef68
2008-03-01 01:52:59 +00:00
Bryan Duxbury 1dc387a0a6 HBASE-473 When a table is deleted, master sends multiple close messages to the region server
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@632131 13f79535-47bb-0310-9956-ffa450edef68
2008-02-28 22:08:35 +00:00
Bryan Duxbury dee0ea4c7a HBASE-466 Move HMasterInterface, HRegionInterface, and HMasterRegionInterface into o.a.h.h.ipc
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630970 13f79535-47bb-0310-9956-ffa450edef68
2008-02-25 19:54:26 +00:00
Bryan Duxbury f48c1d7893 HBASE-442 Move internal classes out of HRegionServer
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630968 13f79535-47bb-0310-9956-ffa450edef68
2008-02-25 19:50:02 +00:00
Jim Kellerman d280d4d0ec HBASE-468 Move HStoreKey back to o.a.h.h
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630605 13f79535-47bb-0310-9956-ffa450edef68
2008-02-24 09:22:10 +00:00
Bryan Duxbury 8e6a233085 HBASE-464 HBASE-419 introduced javadoc errors
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630556 13f79535-47bb-0310-9956-ffa450edef68
2008-02-24 00:36:10 +00:00
Jim Kellerman 30e6c8c070 HBASE-462 Update migration tool
Other miscellaneous changes included:

IdentityTableReduce
- Added SuppressWarnings("unused") for reporter argument
- Removed unnecessary cast.
AbstractMergeTestBase
- Removed unnecessary compaction
StaticTestEnvironment
- Change logging level for client connections which are too noisy in most cases
TestBloomFilters
- Removed unnecessary config settings
- Modified to use BatchUpdate instead of deprecated startUpdate, etc.
TestScannerAPI
- Modified to use BatchUpdate instead of deprecated startUpdate, etc.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630394 13f79535-47bb-0310-9956-ffa450edef68
2008-02-23 06:11:44 +00:00
Jim Kellerman c180c47e3f HBASE-461 Simplify leases.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630389 13f79535-47bb-0310-9956-ffa450edef68
2008-02-23 04:44:11 +00:00
Jim Kellerman f876238940 HBASE-460 TestMigrate broken when HBase moved to subproject
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@630383 13f79535-47bb-0310-9956-ffa450edef68
2008-02-23 03:18:44 +00:00
Michael Stack 9b37593ad6 HBASE-79 When HBase needs to be migrated, it should display a message on
stdout, not just in the logs


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@629203 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 19:38:37 +00:00
Michael Stack 377fb93ca7 HBASE-428 Under continuous upload of rows, WrongRegionExceptions are thrown
that reach the client even after retries
Applied to TRUNK and branch.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@629192 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 19:03:57 +00:00
Bryan Duxbury e714fed123 HBASE-8 [hbase] Delete table does not remove the table directory in the FS
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@629175 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 18:16:00 +00:00
Bryan Duxbury 1f99a440f1 HBASE-448 Add missing name mark
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@628899 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 22:33:23 +00:00
Bryan Duxbury 51a7b53e5b 414 Move client classes into client package
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@627918 13f79535-47bb-0310-9956-ffa450edef68
2008-02-15 00:29:04 +00:00
Jim Kellerman 21932c5981 HBASE-446 Fully qualified hbase.rootdir doesn't work
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@627837 13f79535-47bb-0310-9956-ffa450edef68
2008-02-14 18:49:00 +00:00
Bryan Duxbury dd19c18e76 HBASE-438 XMLOutputter state should be initialized.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@627592 13f79535-47bb-0310-9956-ffa450edef68
2008-02-13 21:09:01 +00:00