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
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
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
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
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
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
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
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
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
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
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
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
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