diff mbox

How to compile Java-Rados.

Message ID CAPrxi59yCsE+4iNd3URAFtvwJKus2O+Z0LOouPbL8NVSGC0jsQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Noah Watkins July 12, 2012, 3:17 p.m. UTC
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

     /**


On Thu, Jul 12, 2012 at 2:22 AM, ramu <ramu.freesystems@gmail.com> wrote:
>
> 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
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

ramu July 13, 2012, 7 a.m. UTC | #1
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.









--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 13, 2012, 3:04 p.m. UTC | #2
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

On Fri, Jul 13, 2012 at 12:00 AM, ramu <ramu.freesystems@gmail.com> wrote:
> 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.
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ramu July 16, 2012, 4:17 a.m. UTC | #3
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 ERROR
conf_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.

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 16, 2012, 4:19 a.m. UTC | #4
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

On Jul 15, 2012, at 9:17 PM, ramu wrote:

> 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 ERROR
> conf_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.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ramu July 16, 2012, 5:32 a.m. UTC | #5
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 ERROR
conf_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.



--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 16, 2012, 7:12 a.m. UTC | #6
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

On Sun, Jul 15, 2012 at 10:32 PM, ramu <ramu.freesystems@gmail.com> wrote:
>
> 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 ERROR
> conf_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.
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ramu July 16, 2012, 7:23 a.m. UTC | #7
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 sec

BUILD 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sage Weil July 16, 2012, 3:26 p.m. UTC | #8
On Mon, 16 Jul 2012, Noah Watkins wrote:
> 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?

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


> 
> Thanks,
> - Noah
> 
> On Sun, Jul 15, 2012 at 10:32 PM, ramu <ramu.freesystems@gmail.com> wrote:
> >
> > 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 ERROR
> > conf_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.
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 16, 2012, 3:49 p.m. UTC | #9
On Mon, Jul 16, 2012 at 8:26 AM, Sage Weil <sage@inktank.com> wrote:
> On Mon, 16 Jul 2012, Noah Watkins wrote:
>> 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?
>
> BTW it's CEPH_CONF for the config file (not CEPH_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


>
> 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
>
>
>>
>> Thanks,
>> - Noah
>>
>> On Sun, Jul 15, 2012 at 10:32 PM, ramu <ramu.freesystems@gmail.com> wrote:
>> >
>> > 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 ERROR
>> > conf_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.
>> >
>> >
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> > the body of a message to majordomo@vger.kernel.org
>> > 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 majordomo@vger.kernel.org
>> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 16, 2012, 3:54 p.m. UTC | #10
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)?

On Mon, Jul 16, 2012 at 12:23 AM, ramu <ramu.freesystems@gmail.com> wrote:
> 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 sec
>
> BUILD 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ramu July 17, 2012, 5:39 a.m. UTC | #11
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 ERROR
rados_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.

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins July 17, 2012, 3:42 p.m. UTC | #12
On Mon, Jul 16, 2012 at 10:39 PM, ramu <ramu.freesystems@gmail.com> wrote:
> Hi Noah,
>
> Testcase: test_ClusterStats took 0.036 sec
>         Caused an ERROR
> rados_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)

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?
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
ramu July 18, 2012, 6:24 a.m. UTC | #13
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.





--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/java/net/newdream/ceph/rados/RadosObject.java
b/src/java/net/newdream/ceph/rados/RadosObject.java
index 851d2aa..6079f6c 100644
--- a/src/java/net/newdream/ceph/rados/RadosObject.java
+++ b/src/java/net/newdream/ceph/rados/RadosObject.java
@@ -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);
     }