Skip to content

Commit

Permalink
CDH4 work-in-progress branch.
Browse files Browse the repository at this point in the history
This still needs work for the tests to compile (eg via Henning's patch on cdh-user)
  • Loading branch information
toddlipcon committed Aug 13, 2012
1 parent c7d54ff commit 2182b3b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
13 changes: 1 addition & 12 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
<property name="src.dir" value="${basedir}/src"/>
<property name="java.src.dir" value="${src.dir}/java"/>
<property name="native.src.dir" value="${basedir}/src/native"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="test.lib.dir" value="${lib.dir}"/>

<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes" value="${build.dir}/classes"/>
Expand Down Expand Up @@ -116,10 +114,6 @@
<!-- the normal classpath -->
<path id="classpath">
<pathelement location="${build.classes}"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<exclude name="**/excluded/" />
</fileset>
<pathelement location="${conf.dir}"/>
<path refid="ivy-common.classpath"/>
</path>
Expand All @@ -132,10 +126,6 @@
<pathelement location="${build.dir}"/>
<pathelement location="${build.examples}"/>
<pathelement location="${build.tools}"/>
<fileset dir="${test.lib.dir}">
<include name="**/*.jar" />
<exclude name="**/excluded/" />
</fileset>
<path refid="classpath"/>
</path>

Expand Down Expand Up @@ -337,7 +327,7 @@
<sysproperty key="test.build.extraconf" value="${test.build.extraconf}" />
<sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
<sysproperty key="java.library.path"
value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
value="${build.native}/lib"/>
<sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
<!-- set compile.c++ in the child jvm only if it is set -->
<syspropertyset dynamic="no">
Expand Down Expand Up @@ -446,7 +436,6 @@
</copy>

<exec dir="${dist.dir}" executable="sh" failonerror="true">
<env key="BASE_NATIVE_LIB_DIR" value="${lib.dir}/native"/>
<env key="BUILD_NATIVE_DIR" value="${build.dir}/native"/>
<env key="DIST_LIB_DIR" value="${dist.dir}/lib/native"/>
<arg line="${native.src.dir}/packageNativeHadoop.sh"/>
Expand Down
8 changes: 8 additions & 0 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
rev="${commons-logging.version}"
conf="commons-logging->master"/>

<dependency org="org.apache.hadoop"
name="hadoop-common"
rev="${hadoop-common.version}"
conf="common->default" />
<dependency org="org.apache.hadoop"
name="hadoop-core"
rev="${hadoop-core.version}"
conf="common->default" />

<!--Configuration: commons-logging -->

Expand Down
8 changes: 8 additions & 0 deletions ivy/ivysettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,27 @@
pattern="${maven2.pattern.ext}"
m2compatible="true"
/>
<ibiblio name="cloudera"
root="https://repository.cloudera.com/artifactory/cloudera-repos/"
pattern="${maven2.pattern.ext}"
m2compatible="true"
/>
<chain name="default" dual="true">
<resolver ref="local"/>
<resolver ref="maven2"/>
<resolver ref="cloudera"/>
</chain>
<chain name="internal">
<resolver ref="local"/>
</chain>
<chain name="external">
<resolver ref="maven2"/>
<resolver ref="cloudera"/>
</chain>
<chain name="external-and-snapshots">
<resolver ref="maven2"/>
<resolver ref="apache-snapshot"/>
<resolver ref="cloudera"/>
</chain>
</resolvers>
<modules>
Expand Down
3 changes: 2 additions & 1 deletion ivy/libraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ hadoop.gpl.compression.version=0.1.0
#These are the versions of our dependencies (in alphabetical order)
commons-logging.version=1.0.4
commons-logging-api.version=1.0.4
#hadoop-core.version=0.20.0
hadoop-core.version=2.0.0-mr1-cdh4.0.0
hadoop-common.version=2.0.0-cdh4.0.0
ivy.version=2.0.0-rc2
junit.version=3.8.1
Binary file removed lib/hadoop-core-0.20.2-cdh3u1.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions src/java/com/hadoop/compression/lzo/LzoDecompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ public synchronized boolean needsInput() {
return false;
}

public synchronized int getRemaining() {
return uncompressedDirectBuf.remaining();
}

public synchronized boolean needsDictionary() {
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion src/java/com/hadoop/compression/lzo/LzopInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected int decompress(byte[] b, int off, int len) throws IOException {
* Read checksums and feed compressed block data into decompressor.
*/
@Override
protected void getCompressedData() throws IOException {
protected int getCompressedData() throws IOException {
checkStream();
verifyChecksums();

Expand Down Expand Up @@ -318,6 +318,8 @@ protected void getCompressedData() throws IOException {

// Send the read data to the decompressor.
ldecompressor.setInput(buffer, 0, compressedLen);

return compressedLen;
}

public long getCompressedBytesRead() {
Expand Down

0 comments on commit 2182b3b

Please sign in to comment.