How to compile Java-Rados.
Hi,
I want to compile java-rados against ceph-0.47.Please help me how to compile java-rados.
Thanks,
Ramu.
Hi Ramu,
I just pushed a patch that should fix your compile problems:
https://github.com/noahdesu/java-rados/commit/0a68aebe2360ca140d470f7dacfc555a618dd976
Note that you may need to change JAVA_HOME in src/native/Makefile.am for your distribution.
Hope things work for you. The bindings are old, but there isn't any reason they shouldn't still function correctly.
- Noah
Quoted 12 lines · ramu
Hi,
I want to compile java-rados against ceph-0.47.Please help me how to compile java-rados.
Thanks,
Ramu.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah Watkins,
When I compiling Java-rados am getting following error,
compile-rados:
[javac] Compiling 8 source files to /home/vu/java-rados/build/java [javac] /home/vu/java-rados/src/java/net/newdream/ce
ph/rados/RadosObject.java:60: cannot find symbol
[javac] symbol : method writeFull(java.lang.String,byte[],long,long) [javac] location: class net.newdream.ceph.rados.IOContext
[javac] ioctx.writeFull(key, buf, len, off);
[javac] ^
[javac] 1 error
Ramu,
Eek, I guess I missed that one. I pushed this patch which should fix it for you. Please 'git pull' to update your tree.
Thanks,
- Noah
(quoted diff) +0 -0
b/src/java/net/newdream/ceph/rados/RadosObject.java index 851d2aa..6079f6c 100644
src/java/net/newdream/ceph/rados/RadosObject.java +0 -2
@@ -54,10 +54,9 @@ public class RadosObject { * * @param buf the data buffer * @param len the amount of data to write - * @param off the offset in the object at which to start writing */ - public void writeFull(byte[] buf, long len, long off) throws
RadosException {
- ioctx.writeFull(key, buf, len, off);
+ public void writeFull(byte[] buf, long len) throws RadosException {
+ ioctx.writeFull(key, buf, len);
}
/**Quoted 27 lines · ramu
Hi Noah Watkins,
When I compiling Java-rados am getting following error,
compile-rados:
[javac] Compiling 8 source files to/home/vu/java-rados/build/java[javac]/home/vu/java-rados/src/java/net/newdream/ce
ph/rados/RadosObject.java:60: cannot find symbol
[javac] symbol : methodwriteFull(java.lang.String,byte[],long,long)[javac] location: class net.newdream.ceph.rados.IOContext
[javac]ioctx.writeFull(key, buf, len, off);
[javac] ^
[javac] 1 error--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
When Iam running ant command Build successful,but in dist folder only librados.jar is came ,there is no libjavarados.a.
After i run the ant test ,it is showing error is,
makedir:
compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 0.026 sec
BUILD FAILED/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failed
Total time: 1 second
Thanks,
Ramu.
Hi Ramu,
The "libtool --mode=install" hack has apparently stopped working. You can get around this problem for the time being by copying the library files you want from src/native/.libs/ into the dist folder.
- Noah
Quoted 38 lines · ramu
Hi Noah,
When Iam running ant command Build successful,but in dist folder only librados.jar is came ,there is no libjavarados.a.
After i run the ant test ,it is showing error is,
makedir:compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 0.026 secBUILD FAILED
/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failedTotal time: 1 second
Thanks,
Ramu.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
I copied all /src/native/.libs/ to dist folder and tried ant test iam getting this error,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 sec
Testcase: test_ClusterStats took 0.022 sec
Caused an ERRORconf_read_file: ret=-22 net.newdream.ceph.rados.RadosException: conf_read_file: ret=-22 at net.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method) at net.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source) at ClusterStatsTest.setup(Unknown Source)
Thanks,
Ramu.
Ramu,
Well, it looks like copying the library files worked. Did you
export CEPH_CONF_FILE=/path/to/ceph.conf
before running 'ant test' ?
- Noah
Quoted 23 lines · ramu
Hi Noah,
I copied all /src/native/.libs/ to dist folder and tried ant test iam getting this error,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secTestcase:
test_ClusterStatstook 0.022 sec
Caused an ERRORconf_read_file: ret=-22 net.newdream.ceph.rados.RadosException:conf_read_file: ret=-22 atnet.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method)atnet.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source)atClusterStatsTest.setup(Unknown Source)Thanks,
Ramu.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
I tried but am getting following error in terminal ,
Buildfile: /home/vu/java-rados/build.xml
makedir:
compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 sec
BUILD FAILED/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failed
Total time: 1 second
and one more error file
is /home/vu/java-rados/TEST-ClusterStatsTest.txt in that file the text is like this,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 sec
Testcase: test_ClusterStats took 0.022 sec
Caused an ERRORconf_read_file: ret=-22
net.newdream.ceph.rados.RadosException: conf_read_file: ret=-22
at net.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method) at net.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source) at ClusterStatsTest.setup(Unknown Source)
Thanks,
Ramu.
Ramu,
I receive the same error code in my installation when the CEPH_CONF_FILE environment variable contains an invalid path. Could you please verify that the path you are using points to a valid Ceph configuration?
Thanks,
- Noah
Quoted 48 lines · ramu
Hi Noah,
I tried but am getting following error in terminal ,
Buildfile:
/home/vu/java-rados/build.xmlmakedir:
compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secBUILD FAILED
/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failedTotal time: 1 second
and one more error file
is/home/vu/java-rados/TEST-ClusterStatsTest.txtin that file the text is like this,Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secTestcase:
test_ClusterStatstook 0.022 sec
Caused an ERRORconf_read_file: ret=-22
net.newdream.ceph.rados.RadosException:conf_read_file: ret=-22
atnet.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method)atnet.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source)atClusterStatsTest.setup(Unknown Source)Thanks,
Ramu.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
I printed the CONF_FILE and file and states,the printed as following,these are in ClusterStatsTest.java.
test:
[junit] Running ClusterStatsTest
[junit] conffile--->/etc/ceph/ceph.conf
[junit] state-->CONFIGURING
[junit] file--->/etc/ceph/ceph.conf
[junit] state-->CONFIGURING
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.123 secBUILD FAILED/home/ramu/java-rados/build.xml:134: Test ClusterStatsTest failed
Quoted 6 lines · Noah Watkins
Ramu,
I receive the same error code in my installation when the
CEPH_CONF_FILEenvironment variable contains an invalid path. Could you please verify that the path you are using points to a valid Ceph configuration?
BTW it's CEPH_CONF for the config file (not CEPH_CONFG_FILE).
Alternatively, you can stick config options in the same format as the command line arguments in CEPH_ARGS. E.g.,
CEPH_ARGS="--debug-ms 1 --log-file foo" some_command ...
sage
Quoted 59 lines
Thanks,
- NoahQuoted 44 lines · ramu
Hi Noah,
I tried but am getting following error in terminal ,
Buildfile:
/home/vu/java-rados/build.xmlmakedir:
compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secBUILD FAILED
/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failedTotal time: 1 second
and one more error file
is/home/vu/java-rados/TEST-ClusterStatsTest.txtin that file the text is like this,Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secTestcase:
test_ClusterStatstook 0.022 sec
Caused an ERRORconf_read_file: ret=-22
net.newdream.ceph.rados.RadosException:conf_read_file: ret=-22
atnet.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method)atnet.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source)atClusterStatsTest.setup(Unknown Source)Thanks,
Ramu.Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Sage Weil
Quoted 6 lines · Noah Watkins
Ramu,
I receive the same error code in my installation when the
CEPH_CONF_FILEenvironment variable contains an invalid path. Could you please verify that the path you are using points to a valid Ceph configuration?BTW it's
CEPH_CONFfor the config file (notCEPH_CONFG_FILE).
It turns out to be quite awkward to tell the unit tests about the configuration location, and using an environment variable is convenient. However, I wasn't aware of CEPH_CONF, and in fact the unit test framework looks for CEPH_CONFIG_FILE. The later should definitely be removed (ramu, can you try CEPH_CONF?), and this isn't an issue in libcephfs wrappers -- the rados wrappers are incredibly old.
Thanks, Noah
Quoted 68 lines
Alternatively, you can stick config options in the same format as the command line arguments in
CEPH_ARGS. E.g.,CEPH_ARGS="--debug-ms 1 --log-file foo" some_command ...sage
Quoted 59 lines
Thanks,
- NoahQuoted 44 lines · ramu
Hi Noah,
I tried but am getting following error in terminal ,
Buildfile:
/home/vu/java-rados/build.xmlmakedir:
compile-rados:
compile-tests:
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secBUILD FAILED
/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failedTotal time: 1 second
and one more error file
is/home/vu/java-rados/TEST-ClusterStatsTest.txtin that file the text is like this,Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.04 secTestcase:
test_ClusterStatstook 0.022 sec
Caused an ERRORconf_read_file: ret=-22
net.newdream.ceph.rados.RadosException:conf_read_file: ret=-22
atnet.newdream.ceph.rados.Cluster.native_conf_read_file(Native Method)atnet.newdream.ceph.rados.Cluster.readConfigFile(Unknown Source)atClusterStatsTest.setup(Unknown Source)Thanks,
Ramu.Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Disregard that last message. Ok, I'm not sure where else EINVAL gets returned in the configuration path, but I can look into it this evening. I tested the wrappers on a clean install last night and they seem to be working for me. Can you turn on debug logging with CEPH_ARGS (as per Sage's last email)?
Quoted 23 lines · ramu
Hi Noah,
I printed the
CONF_FILEand file and states,the printed as following,these are in ClusterStatsTest.java.test:
[junit] Running ClusterStatsTest [junit] conffile--->/etc/ceph/ceph.conf [junit] state-->CONFIGURING [junit] file--->/etc/ceph/ceph.conf [junit] state-->CONFIGURING [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.123 secBUILD FAILED
/home/ramu/java-rados/build.xml:134: Test ClusterStatsTest failed--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
I hardcoded CONF_FIL="/etc/ceph/ceph.conf"; and commented //System.getProperty("CEPH_CONF_FILE"); in RadosTestUtils.java. And run the ant and after run ant test,but iam getting same error.
Buildfile: /home/vu/java-rados/build.xml
makedir:
compile-rados:
compile-tests:
[javac] Compiling 1 source file to /home/vu/java-rados/build/test
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.068 sec
BUILD FAILED/home/vu/java-rados/build.xml:134: Test ClusterStatsTest failed
Total time: 2 seconds
and in TEST-ClusterStatsTest.txt file also getting same errors,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.068 sec
Testcase: test_ClusterStats took 0.036 sec
Caused an ERRORrados_connect: ret=-1 net.newdream.ceph.rados.RadosException: rados_connect: ret=-1
at net.newdream.ceph.rados.Cluster.native_connect(Native Method) at net.newdream.ceph.rados.Cluster.connect(Unknown Source) at ClusterStatsTest.setup(Unknown Source)
-->How to give CEPH_ARGS.
Thanks,
Ramu.
Quoted 8 lines · ramu
Hi Noah,
Testcase:
test_ClusterStatstook 0.036 sec
Caused an ERRORrados_connect: ret=-1 net.newdream.ceph.rados.RadosException:rados_connect: ret=-1
atnet.newdream.ceph.rados.Cluster.native_connect(Native Method)atnet.newdream.ceph.rados.Cluster.connect(Unknown Source)
That return code, -1, should correspond to -EPERM. I don't see this error code in the rados client code. Are you able to use the same ceph.conf file to connect and interact with RADOS using a interface other than the Java wrappers?
Checking the OSD logs might reveal the problem... do you have these available?
Hi Noah,
After reinstalled java-rados,when I run ant test now am getting follwing error in terminal,
Buildfile: /home/vutp/java-rados/build.xml
makedir:
compile-rados:
compile-tests:
[javac] Compiling 1 source file to /home/vutp/java-rados/build/test
jar:
test:
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.044 sec [junit] Running ClusterTest
[junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 6.569 sec
BUILD FAILED/home/vutp/java-rados/build.xml:134: Test ClusterTest failed
Total time: 10 seconds
-->And also two txt files generated in Java-Rados directory one is TEST- ClusterStatsTest.txt in this file the text is ,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.044 sec
Testcase: test_ClusterStats took 0.027 sec
-->and one more txt file is TEST-ClusterTest.txt in this file the text is ,
Testsuite: ClusterTest
Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 6.569 sec
Testcase: test_ConfigOption took 0.026 sec
FAILED
junit.framework.AssertionFailedError:
at ClusterTest.test_ConfigOption(Unknown Source)
Testcase: test_getClusterStats took 0.005 sec
Testcase: test_getInstancePointer took 0.004 sec
Testcase: test_getVersion took 0.005 sec
Testcase: test_PoolOperations took 1.821 sec
Testcase: test_openIOContext took 2.134 sec
Testcase: test_PoolList took 2.543 sec
Thanks,
Ramu.
Please 'git pull' to grab the following change which solved the same problem in my location tree:
src/test/ClusterTest.java +2 -2
@@ -25,13 +25,13 @@ public class ClusterTest { String val1, val2; /* set option to 2 and check that it set */ - val1 = "2"; + val1 = "true"; cluster.setConfigOption(opt, val1); val2 = cluster.getConfigOption(opt); assertTrue(val1.compareTo(val2) == 0); /* make sure the option wasn't already 2 */ - val1 = "1"; + val1 = "false"; cluster.setConfigOption(opt, val1); val2 = cluster.getConfigOption(opt); assertTrue(val1.compareTo(val2) == 0);
Quoted 4 lines · ramu
[junit] Running ClusterStatsTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.044 sec [junit] Running ClusterTest
[junit] Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 6.569 sec
good, no errors.
Quoted 10 lines
BUILD FAILED
/home/vutp/java-rados/build.xml:134: Test ClusterTest failedTotal time: 10 seconds
-->And also two txt files generated in Java-Rados directory one is TEST- ClusterStatsTest.txt in this file the text is ,
Testsuite: ClusterStatsTest
Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.044 sec
no errors here either.
Quoted 4 lines
Testcase:
test_ClusterStatstook 0.027 sec-->and one more txt file is TEST-ClusterTest.txt in this file the text is ,
Quoted 8 lines
Testsuite: ClusterTest
Tests run: 7, Failures: 1, Errors: 0, Time elapsed: 6.569 secTestcase:
test_ConfigOptiontook 0.026 sec
FAILEDjunit.framework.AssertionFailedError:
atClusterTest.test_ConfigOption(Unknown Source)
So, it looks like we are down to one error?
Quoted 19 lines
Testcase:
test_getClusterStatstook 0.005 sec
Testcase:test_getInstancePointertook 0.004 sec
Testcase:test_getVersiontook 0.005 sec
Testcase:test_PoolOperationstook 1.821 sec
Testcase:test_openIOContexttook 2.134 sec
Testcase:test_PoolListtook 2.543 secThanks,
Ramu.--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Noah,
Thank u for your reply,it is working fine but Iam getting one more error in terminal is,BUILD FAILED /home/vu/java-rados/build.xml:134: Test IOContextTest failed
Total time: 43 seconds
and in TEST-IOContextTest.txt file the error is,
Testsuite: IOContextTest
Tests run: 11, Failures: 1, Errors: 0, Time elapsed: 32.302 sec
Testcase: test_toString took 1.791 sec
Testcase: test_getCluster took 2.116 sec
Testcase: test_getPoolStats took 2.364 sec
Testcase: test_setLocatorKey took 2.046 sec
Testcase: test_write took 3.109 sec
Testcase: test_writeFull took 3.188 sec
Testcase: test_getLastVersion took 2.46 sec
Testcase: test_append took 3.505 sec
Testcase: test_truncate took 3.423 sec
Testcase: test_getsetAttribute took 3.161 sec
Testcase: test_getObjects took 5.101 sec
FAILED
junit.framework.AssertionFailedError:
at IOContextTest.test_getObjects(Unknown Source)
Thanks,
Ramu.
Hi Noah,
Thank you for fixes and suggestions of compilation of java-rados , It's working fine now.
Thanks,
Ramu.