[DWRF] getRecordWriter backward compatible with RCFile

Summary:
getRecordWriter now checks if the work output path is set in the conf and prepends this to the output path if it is.

this, combined with the change earlier to get the filesystem from this same path, make it backward compatible with the way users are calling the same method on RCFile.

Test Plan: Added a test case to make sure it works, had a user verify it works for their use case.
[DWRF] Try flushing before closing

Summary:
We've seen a couple instances where the ORC file reader fails to parse the post script of a file (i.e. the last n bytes of the file).

So far I've been entirely unable to reproduce it.  This is my best guess for the cause (if we weren't flushing the last few bytes it would make the postscript invalid).

The HDFS team assures me this won't do anything, so worst case it has no effect.

RC file and Sequence file both call flush, so let's see if this has any effect.

Test Plan: ptests pass.
[DWRF] make struct fields case insensitive

Summary:
RC file treats struct field names as case insensitive strings

Using the same technique to achieve the same in DWRF (changing to lower case)

Test Plan:
added test cases to demonstrate

running ptests
Fix tests
Merge pull request #14 from kevinwilfong/test

Fix tests
[maven-release-plugin] prepare release 0.10
[maven-release-plugin] prepare for next development iteration
seekToRow in RecordReaderImpl does not update rowInStripe which can cause readers to read off the end of streams because a new stripe may not be read when the end of the stripe is reached.

Added a test case to demonstrate this.

Also, modified another test case to call seekToRow to skip <n> rows instead of calling seekToRow for each row regardless of whether the row is read or not.
Merge pull request #15 from kevinwilfong/seekToRow

seekToRow in RecordReaderImpl does not update rowInStripe which can caus...
Added documentation to RunLengthByte reader and writer. Did minor refac

Summary:
@public
Added documentation to RunLengthByte reader and writer. Did minor refac

Test Plan: Ran unit tests

Reviewers: kevinwilfong

Reviewed By: kevinwilfong

Differential Revision: https://phabricator.fb.com/D1427856
[DWRF] Add a testcase to make sure that setting offset in Reader.rows to a stripe offset will not skip that stripe.

Summary:
@public
I was a little nervous that this wouldn't work, fortunately it does, thought it'd be good to add a test case to make sure it continues to in the future.

The test case writes to stripes and reads them using Reader.rows setting offset and length to those of the respective stripes, and makes sure it reads the correct stripe and only the correct stripe.

Test Plan: The tests pass.

Reviewers: tejasp

Reviewed By: tejasp

Subscribers: hive-devel@

Differential Revision: https://phabricator.fb.com/D1427818
[DWRF] Changes needed for FileCat in Hive

Summary: Made OrcRecordReader public and exposed its ObjectInspector

Test Plan: Ran 'mvn clean install'

Reviewers: kevinwilfong

Reviewed By: kevinwilfong

Subscribers: hive-devel@

Differential Revision: https://phabricator.fb.com/D1434624

Tasks: 4634790
[maven-release-plugin] prepare release 0.11
[maven-release-plugin] prepare for next development iteration
Merge pull request #16 from facebook/release

Release
[DWRF] Move compression classes to a separate package

Summary:
@public
same as title

Test Plan: ran test cases

Reviewers: kevinwilfong

Reviewed By: kevinwilfong

Subscribers: hive-devel@

Differential Revision: https://phabricator.fb.com/D1451554
[DWRF] Fix "Can't read header" bug in CompressedStream

Summary:
@public
There is a bug in the CompressedStream class where if the stream is initialized from a ByteBuffer (instead of a file) and seek is called before any data is read currentChunk would be set to 0.  Then if all the data is read from the stream and available() is called, it would throw a "Can't read header" error.  This is because available only returns 0 if all the data from the current compressed chunk has been read *and* the currentChunk is >= the number of chunks (in this case 1).

The fix I chose was to add a check in seek, if none of the data has been read and file is null (the data is coming from a ByteBuffer) don't change the value of currentChunk and don't call readData.  This means currentChunk will keep it's original value of 1.  readData immediately checks if file is null and returns so there's no real change there.

Test Plan: Added a test case which failed before the fix.

Reviewers: tejasp

Reviewed By: tejasp

Differential Revision: https://phabricator.fb.com/D1466979

Tasks: 4809068
[DWRF] Remove redundant stuff from TestFileDump

Summary:
@public
We already create conf object in @Before which is invoked before *every* individual test case so no need to have multiple objects

Test Plan: ran test cases

Reviewers: kevinwilfong

Reviewed By: kevinwilfong

Subscribers: hive-devel@

Differential Revision: https://phabricator.fb.com/D1450904

Tasks: 4738072
[DWRF] Use capacity based constructor for ArrayLists whenever possible

Summary:
@public
same as title

Test Plan: Ran test cases

Reviewers: kevinwilfong

Reviewed By: kevinwilfong

Subscribers: hive-devel@

Differential Revision: https://phabricator.fb.com/D1450437

Tasks: 4738072
[maven-release-plugin] prepare release 0.12