Skip to content

Commit

Permalink
Most lates code with different comapatibility for open source release
Browse files Browse the repository at this point in the history
version as 1.0.8
  • Loading branch information
jombie committed Jun 24, 2014
1 parent 688559e commit 5af1d07
Show file tree
Hide file tree
Showing 47 changed files with 650 additions and 1,591 deletions.
43 changes: 23 additions & 20 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/test"/>
<classpathentry kind="lib" path="lib/1line-ferrari.jar"/>
<classpathentry kind="lib" path="lib/gson-2.2.2-sources.jar"/>
<classpathentry kind="lib" path="lib/gson-2.2.2.jar"/>
<classpathentry kind="lib" path="lib/hsearch-federated.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="lib/lucene-queryparser-3.6.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="libhadoop/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="libhadoop/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="libhadoop/hadoop-client-1.2.0.1.3.0.0-107.jar"/>
<classpathentry kind="lib" path="libhadoop/hadoop-core-1.2.0.1.3.0.0-107.jar"/>
<classpathentry kind="lib" path="libhadoop/hbase-0.94.6.1.3.0.0-107-security.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="E:/mnt/install/java/jdk1.6/lib/tools.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="commonlib/1line-ferrari.jar"/>
<classpathentry kind="lib" path="commonlib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="commonlib/commons-jexl-2.1.1.jar"/>
<classpathentry kind="lib" path="commonlib/commons-lang-2.5.jar"/>
<classpathentry kind="lib" path="commonlib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="commonlib/gson-2.2.2.jar"/>
<classpathentry kind="lib" path="commonlib/log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="commonlib/lucene-analyzers-3.6.2.jar"/>
<classpathentry kind="lib" path="commonlib/lucene-core-3.6.2.jar"/>
<classpathentry kind="lib" path="commonlib/lucene-queryparser-3.6.2.jar"/>
<classpathentry kind="lib" path="lib/hsearch-federated.jar"/>
<classpathentry kind="lib" path="hadooplib_12/hadoop-client-1.2.0.1.3.0.0-107.jar"/>
<classpathentry kind="lib" path="hadooplib_12/hadoop-core-1.2.0.1.3.0.0-107.jar"/>
<classpathentry kind="lib" path="hadooplib_12/hbase-0.94.6.1.3.0.0-107-security.jar"/>
<classpathentry kind="lib" path="hadooplib_12/zookeeper-3.4.5.1.3.3.0-58.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
10 changes: 7 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name=hsearch-core
version=1.0
version=1.0.3

company=Bizosys Technologies Pvt Ltd.

basedir = .
src.dir = ${basedir}/src/java
test.dir = ${basedir}/src/test
lib.dir = ${basedir}/lib
buildlib.dir = ${basedir}/buildlib
commonlib.dir = ${basedir}/commonlib
hadooplib.dir = ${basedir}/hadooplib
conf.dir = ${basedir}/conf
compatibility.dir = ${basedir}/src/compatibility
javadoc.dir = ${basedir}/javadoc

build.dir = ${basedir}/build
build.classes = ${build.dir}/classes
Expand All @@ -19,4 +22,5 @@ context.root = ${name}
javac.debug=on
javac.optimize=on
javac.deprecation=off
javac.version=1.6
javac.version=1.6
hadoolib.version=12
43 changes: 34 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* limitations under the License.
-->

<project name="hsearch-core" basedir=".">
<project name="hsearch-core-old" basedir=".">

<property name="currdir" value="${basedir}" />
<property file="${currdir}/build.properties" />
Expand All @@ -29,13 +29,28 @@
<format property="build.time" pattern="dd MMM yyyy hh:mm aa"/>
</tstamp>

<target name="compatibility">
<copy overwrite="true" todir="${src.dir}/com/bizosys/hsearch/hbase/" verbose="true">
<fileset dir="${compatibility.dir}/hadooplib_${hadoolib.version}/hbase/" includes="*.java" />
</copy>
<copy overwrite="true" todir="${src.dir}/com/bizosys/hsearch/treetable/storage/" verbose="true">
<fileset dir="${compatibility.dir}/hadooplib_${hadoolib.version}/storage/" includes="*.java" />
</copy>
<copy overwrite="true" todir="${src.dir}/com/bizosys/hsearch/treetable/storage/protobuf/generated/" verbose="true">
<fileset dir="${compatibility.dir}/hadooplib_${hadoolib.version}/protobuf/" includes="*.java" />
</copy>
</target>

<!-- the normal classpath -->
<path id="classpath">
<pathelement location="${build.classes}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}hadoop">
<fileset dir="${hadooplib.dir}_${hadoolib.version}">
<include name="*.jar" />
</fileset>
<fileset dir="${commonlib.dir}">
<include name="*.jar" />
</fileset>
</path>
Expand Down Expand Up @@ -79,16 +94,18 @@
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
<target name="jar" depends="compile-core,jar-sources">
<target name="jar" depends="compatibility,compile-core,jar-sources">
<copy todir="${build.classes}" verbose="true">
<fileset dir="${src.dir}" includes="**/*.tmp" />
<fileset dir="${src.dir}" includes="**/schema-*.json" />
<fileset dir="${conf.dir}" includes="hsearch-default.xml" />
</copy>
<jar jarfile="${name}.jar" basedir="${build.classes}">
<manifest>
<attribute name="Version" value="${version}"/>
<attribute name="Company" value="${company}"/>
<attribute name="Product-Name" value="${name}"/>
<attribute name="Version" value="${version}"/>
<attribute name="Java-Version" value="${java.version}"/>
<attribute name="Created-By" value="${company}(${build.time})"/>
<attribute name="BuildDate" value="${build.time}"/>
</manifest>
</jar>
Expand All @@ -101,16 +118,20 @@

<jar jarfile="src-${name}.jar" basedir="${src.dir}">
<manifest>
<attribute name="Created-By" value="${company}(${build.time})"/>
<attribute name="Version" value="${version}"/>
<attribute name="Product-Name" value="${name}"/>
<attribute name="Version" value="${version}"/>
<attribute name="Java-Version" value="${java.version}"/>
<attribute name="Created-By" value="${company}(${build.time})"/>
<attribute name="BuildDate" value="${build.time}"/>
</manifest>
</jar>

<jar jarfile="nightly/src-${name}_${version}.jar" basedir="${src.dir}">
<manifest>
<attribute name="Created-By" value="${company}(${build.time})"/>
<attribute name="Version" value="${version}"/>
<attribute name="Product-Name" value="${name}"/>
<attribute name="Version" value="${version}"/>
<attribute name="Java-Version" value="${java.version}"/>
<attribute name="Created-By" value="${company}(${build.time})"/>
<attribute name="BuildDate" value="${build.time}"/>
</manifest>
</jar>
Expand All @@ -130,4 +151,8 @@
<delete dir="${build.dir}" />
</target>

<target name="javadoc" depends="init" description="Generate Documentation">
<javadoc sourcepath="${src.dir}" destdir="${javadoc.dir}" classpathref="classpath"/>
</target>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"module" : "com.bizosys.hsearch.treetable.example.impl",
"table": "htable-test",
"table": "hsearch-test",
"columns": [
{
"name": "ExamResult",
Expand Down
Binary file modified hsearch-core.jar
Binary file not shown.
Binary file removed lib/1line-ferrari.jar
Binary file not shown.
Binary file removed lib/gson-2.2.2-sources.jar
Binary file not shown.
Binary file removed lib/gson-2.2.2.jar
Binary file not shown.
Binary file modified lib/hsearch-federated.jar
Binary file not shown.
Binary file removed lib/log4j-1.2.16.jar
Binary file not shown.
Binary file removed lib/lucene-queryparser-3.6.2.jar
Binary file not shown.
Binary file modified lib/src-hsearch-federated.jar
Binary file not shown.
Binary file removed libhadoop/commons-cli-1.2.jar
Binary file not shown.
Binary file removed libhadoop/commons-logging-1.1.1.jar
Binary file not shown.
Binary file removed libhadoop/hadoop-client-1.2.0.1.3.0.0-107.jar
Binary file not shown.
Binary file removed libhadoop/hadoop-core-1.2.0.1.3.0.0-107.jar
Binary file not shown.
Binary file removed libhadoop/hbase-0.94.6.1.3.0.0-107-security.jar
Binary file not shown.
Binary file modified nightly/src-hsearch-core_1.0.jar
Binary file not shown.
Binary file modified src-hsearch-core.jar
Binary file not shown.
7 changes: 5 additions & 2 deletions src/java/com/bizosys/hsearch/admin/HSearchShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;

import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;

import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import com.bizosys.hsearch.treetable.compiler.HSearchCompiler;
import com.sun.tools.javac.Main;

public class HSearchShell extends Configured implements Tool {

Expand Down Expand Up @@ -101,7 +103,8 @@ public void createTable(String schemaFile){
}

//compile
Main.compile(compileArgs);
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
compiler.run(null, null, null, compileArgs);


//make jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public final int getSize() {
public final byte[] toBytes(final Collection<BitSetWrapper> sortedCollection) throws IOException {

Collection<byte[]> sortedCollectionB = new ArrayList<byte[]>(sortedCollection.size());
for (BitSetWrapper bitSet : sortedCollection) {
sortedCollectionB.add(bitSet.toByteArray());
for (BitSetWrapper BitSetWrapper : sortedCollection) {
sortedCollectionB.add(BitSetWrapper.toByteArray());
}
return sba.toBytes(sortedCollectionB);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected final int compare(final byte[] inputB, int offset, final Integer match

public final short getShort(Integer aVal) throws IOException {
if ( aVal > MAXIMUM_ALLOWED_LIMIT) throw new IOException("Suplied Value " +
aVal.toString() + " is greated than maximum limit : " + MAXIMUM_ALLOWED_LIMIT);
aVal.toString() + " is greater than maximum limit : " + MAXIMUM_ALLOWED_LIMIT);

if (aVal < MINIMUM_ALLOWED_LIMIT) throw new IOException("Suplied Value " +
aVal.toString() + " is less than minimum limit." + MINIMUM_ALLOWED_LIMIT);
Expand Down
Loading

0 comments on commit 5af1d07

Please sign in to comment.