All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL v5] java: add libcephfs Java bindings
@ 2012-09-06  3:26 Noah Watkins
  2012-09-06 15:42 ` Sage Weil
  0 siblings, 1 reply; 16+ messages in thread
From: Noah Watkins @ 2012-09-06  3:26 UTC (permalink / raw)
  To: ceph-devel

Latest version of Java bindings. There is ~full coverage of the
libcephfs API, and nearly a complete set of unit tests covering
success, and common failure cases. In addition to the basic review, I
think the Debian integration needs review.

Patches are here:

  git://github.com/noahdesu/ceph.git wip-java-cephfs

----------------------------------------------------------------
Noah Watkins (4):
      libcephfs: return error when not mounted
      java: add Java and C++ source files
      automake: setup autotools to build cephfs-java
      debian: add libcephfs-java package

Sage Weil (2):
      do_autogen.sh: add -j flag to enable java stuff
      Makefile: add src/include to #include path for libcephfs_jni_la

 configure.ac                                       |   74 +
 debian/.gitignore                                  |    1 +
 debian/control                                     |    7 +-
 debian/libceph1-java.install                       |    2 +
 debian/rules                                       |    1 +
 do_autogen.sh                                      |    5 +-
 src/Makefile.am                                    |   15 +-
 src/common/config_opts.h                           |    1 +
 src/include/cephfs/libcephfs.h                     |    7 +
 src/java/.gitignore                                |    4 +
 src/java/Makefile.am                               |   43 +
 src/java/README                                    |   48 +
 src/java/build.xml                                 |   67 +
 src/java/java/com/ceph/fs/CephMount.java           |  645 ++++++
 src/java/java/com/ceph/fs/CephNativeLoader.java    |   35 +
 .../java/com/ceph/fs/CephNotMountedException.java  |   42 +
 src/java/java/com/ceph/fs/CephStat.java            |   45 +
 src/java/java/com/ceph/fs/CephStatVFS.java         |   33 +
 src/java/native/libcephfs_jni.cc                   | 2383 ++++++++++++++++++++
 src/java/test/CephMountCreateTest.java             |   88 +
 src/java/test/CephMountTest.java                   |  797 +++++++
 src/java/test/CephUnmountedTest.java               |  143 ++
 src/libcephfs.cc                                   |  134 +-
 23 files changed, 4614 insertions(+), 6 deletions(-)
 create mode 100644 debian/libceph1-java.install
 create mode 100644 src/java/.gitignore
 create mode 100644 src/java/Makefile.am
 create mode 100644 src/java/README
 create mode 100644 src/java/build.xml
 create mode 100644 src/java/java/com/ceph/fs/CephMount.java
 create mode 100644 src/java/java/com/ceph/fs/CephNativeLoader.java
 create mode 100644 src/java/java/com/ceph/fs/CephNotMountedException.java
 create mode 100644 src/java/java/com/ceph/fs/CephStat.java
 create mode 100644 src/java/java/com/ceph/fs/CephStatVFS.java
 create mode 100644 src/java/native/libcephfs_jni.cc
 create mode 100644 src/java/test/CephMountCreateTest.java
 create mode 100644 src/java/test/CephMountTest.java
 create mode 100644 src/java/test/CephUnmountedTest.java

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-09-06  3:26 [GIT PULL v5] java: add libcephfs Java bindings Noah Watkins
@ 2012-09-06 15:42 ` Sage Weil
  2012-09-06 18:02   ` Noah Watkins
  0 siblings, 1 reply; 16+ messages in thread
From: Sage Weil @ 2012-09-06 15:42 UTC (permalink / raw)
  To: Noah Watkins, gcs; +Cc: ceph-devel

On Wed, 5 Sep 2012, Noah Watkins wrote:
> Latest version of Java bindings. There is ~full coverage of the
> libcephfs API, and nearly a complete set of unit tests covering
> success, and common failure cases. In addition to the basic review, I
> think the Debian integration needs review.
> 
> Patches are here:
> 
>   git://github.com/noahdesu/ceph.git wip-java-cephfs

The debian bits look okay to my untrained eye.  Laszlo, do you mind taking 
a quick look?

Also, I noticed the automake patch removes CephException.java, added in 
the previous patch... probably an accident?

Can't wait to pull this in!  BTW, Noah, do you know if this is still an 
issue?

	http://tracker.newdream.net/issues/2778

Thanks!
sage

> 
> ----------------------------------------------------------------
> Noah Watkins (4):
>       libcephfs: return error when not mounted
>       java: add Java and C++ source files
>       automake: setup autotools to build cephfs-java
>       debian: add libcephfs-java package
> 
> Sage Weil (2):
>       do_autogen.sh: add -j flag to enable java stuff
>       Makefile: add src/include to #include path for libcephfs_jni_la
> 
>  configure.ac                                       |   74 +
>  debian/.gitignore                                  |    1 +
>  debian/control                                     |    7 +-
>  debian/libceph1-java.install                       |    2 +
>  debian/rules                                       |    1 +
>  do_autogen.sh                                      |    5 +-
>  src/Makefile.am                                    |   15 +-
>  src/common/config_opts.h                           |    1 +
>  src/include/cephfs/libcephfs.h                     |    7 +
>  src/java/.gitignore                                |    4 +
>  src/java/Makefile.am                               |   43 +
>  src/java/README                                    |   48 +
>  src/java/build.xml                                 |   67 +
>  src/java/java/com/ceph/fs/CephMount.java           |  645 ++++++
>  src/java/java/com/ceph/fs/CephNativeLoader.java    |   35 +
>  .../java/com/ceph/fs/CephNotMountedException.java  |   42 +
>  src/java/java/com/ceph/fs/CephStat.java            |   45 +
>  src/java/java/com/ceph/fs/CephStatVFS.java         |   33 +
>  src/java/native/libcephfs_jni.cc                   | 2383 ++++++++++++++++++++
>  src/java/test/CephMountCreateTest.java             |   88 +
>  src/java/test/CephMountTest.java                   |  797 +++++++
>  src/java/test/CephUnmountedTest.java               |  143 ++
>  src/libcephfs.cc                                   |  134 +-
>  23 files changed, 4614 insertions(+), 6 deletions(-)
>  create mode 100644 debian/libceph1-java.install
>  create mode 100644 src/java/.gitignore
>  create mode 100644 src/java/Makefile.am
>  create mode 100644 src/java/README
>  create mode 100644 src/java/build.xml
>  create mode 100644 src/java/java/com/ceph/fs/CephMount.java
>  create mode 100644 src/java/java/com/ceph/fs/CephNativeLoader.java
>  create mode 100644 src/java/java/com/ceph/fs/CephNotMountedException.java
>  create mode 100644 src/java/java/com/ceph/fs/CephStat.java
>  create mode 100644 src/java/java/com/ceph/fs/CephStatVFS.java
>  create mode 100644 src/java/native/libcephfs_jni.cc
>  create mode 100644 src/java/test/CephMountCreateTest.java
>  create mode 100644 src/java/test/CephMountTest.java
>  create mode 100644 src/java/test/CephUnmountedTest.java
> --
> 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
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-09-06 15:42 ` Sage Weil
@ 2012-09-06 18:02   ` Noah Watkins
  2012-10-03 19:34     ` Noah Watkins
  0 siblings, 1 reply; 16+ messages in thread
From: Noah Watkins @ 2012-09-06 18:02 UTC (permalink / raw)
  To: Sage Weil; +Cc: gcs, ceph-devel

On Thu, Sep 6, 2012 at 8:42 AM, Sage Weil <sage@inktank.com> wrote:
>
> Also, I noticed the automake patch removes CephException.java, added in
> the previous patch... probably an accident?

I left CephException out intentionally because it could be replaced by
generic exceptions in Java like IOException or FileNotFoundException.
My belief is that CephException (and specializations of this) will
need to be re-introduced as more error cases are covered. For example,
I think we'll want a CephBadFileDescriptor, but currently libcephfs
doesn't appear to return -EBADF (the client is crashing do to fd_map
assert). So, the Java wrappers should be as stable as the C API, but
both seem to need some loose ends tied up.

> Can't wait to pull this in!  BTW, Noah, do you know if this is still an
> issue?
>
>         http://tracker.newdream.net/issues/2778

It does appear that -ENOENT is now returned. I added a unit test that
expects FileNotFoundException and that works out nicely.

- Noah

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-09-06 18:02   ` Noah Watkins
@ 2012-10-03 19:34     ` Noah Watkins
  2012-10-03 19:39       ` Sage Weil
  2012-10-03 21:26       ` Gregory Farnum
  0 siblings, 2 replies; 16+ messages in thread
From: Noah Watkins @ 2012-10-03 19:34 UTC (permalink / raw)
  To: Sage Weil; +Cc: Joe Buck, gcs, ceph-devel

Hi Sage,

I wanted to touch base on this Java bindings patch series to make sure
this can become a solid foundation for the Hadoop shim clean-up. Were
there any specific issues with this, other than not yet having a major
consumer?

-Noah

On Thu, Sep 6, 2012 at 11:02 AM, Noah Watkins <jayhawk@cs.ucsc.edu> wrote:
> On Thu, Sep 6, 2012 at 8:42 AM, Sage Weil <sage@inktank.com> wrote:
>>
>> Also, I noticed the automake patch removes CephException.java, added in
>> the previous patch... probably an accident?
>
> I left CephException out intentionally because it could be replaced by
> generic exceptions in Java like IOException or FileNotFoundException.
> My belief is that CephException (and specializations of this) will
> need to be re-introduced as more error cases are covered. For example,
> I think we'll want a CephBadFileDescriptor, but currently libcephfs
> doesn't appear to return -EBADF (the client is crashing do to fd_map
> assert). So, the Java wrappers should be as stable as the C API, but
> both seem to need some loose ends tied up.
>
>> Can't wait to pull this in!  BTW, Noah, do you know if this is still an
>> issue?
>>
>>         http://tracker.newdream.net/issues/2778
>
> It does appear that -ENOENT is now returned. I added a unit test that
> expects FileNotFoundException and that works out nicely.
>
> - Noah

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-03 19:34     ` Noah Watkins
@ 2012-10-03 19:39       ` Sage Weil
  2012-10-04  4:23         ` Laszlo Boszormenyi (GCS)
  2012-10-04 20:24         ` James Page
  2012-10-03 21:26       ` Gregory Farnum
  1 sibling, 2 replies; 16+ messages in thread
From: Sage Weil @ 2012-10-03 19:39 UTC (permalink / raw)
  To: gcs, Noah Watkins; +Cc: Joe Buck, ceph-devel

On Wed, 3 Oct 2012, Noah Watkins wrote:
> Hi Sage,
> 
> I wanted to touch base on this Java bindings patch series to make sure
> this can become a solid foundation for the Hadoop shim clean-up. Were
> there any specific issues with this, other than not yet having a major
> consumer?

From my perspective it's ready.  I was hoping that Laszlo could look at 
the packaging bits before I merged, but then I lost track of it.

Laszlo, do you have a minute to take a look?

Thanks!
sage

> 
> -Noah
> 
> On Thu, Sep 6, 2012 at 11:02 AM, Noah Watkins <jayhawk@cs.ucsc.edu> wrote:
> > On Thu, Sep 6, 2012 at 8:42 AM, Sage Weil <sage@inktank.com> wrote:
> >>
> >> Also, I noticed the automake patch removes CephException.java, added in
> >> the previous patch... probably an accident?
> >
> > I left CephException out intentionally because it could be replaced by
> > generic exceptions in Java like IOException or FileNotFoundException.
> > My belief is that CephException (and specializations of this) will
> > need to be re-introduced as more error cases are covered. For example,
> > I think we'll want a CephBadFileDescriptor, but currently libcephfs
> > doesn't appear to return -EBADF (the client is crashing do to fd_map
> > assert). So, the Java wrappers should be as stable as the C API, but
> > both seem to need some loose ends tied up.
> >
> >> Can't wait to pull this in!  BTW, Noah, do you know if this is still an
> >> issue?
> >>
> >>         http://tracker.newdream.net/issues/2778
> >
> > It does appear that -ENOENT is now returned. I added a unit test that
> > expects FileNotFoundException and that works out nicely.
> >
> > - Noah
> --
> 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
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-03 19:34     ` Noah Watkins
  2012-10-03 19:39       ` Sage Weil
@ 2012-10-03 21:26       ` Gregory Farnum
  1 sibling, 0 replies; 16+ messages in thread
From: Gregory Farnum @ 2012-10-03 21:26 UTC (permalink / raw)
  To: Noah Watkins; +Cc: Sage Weil, Joe Buck, ceph-devel

Sorry I haven't provided any feedback on this either — it's still in
my queue but I've had a great many things to do since you sent it
along. :)
-Greg

On Wed, Oct 3, 2012 at 12:34 PM, Noah Watkins <jayhawk@cs.ucsc.edu> wrote:
> Hi Sage,
>
> I wanted to touch base on this Java bindings patch series to make sure
> this can become a solid foundation for the Hadoop shim clean-up. Were
> there any specific issues with this, other than not yet having a major
> consumer?
>
> -Noah
>
> On Thu, Sep 6, 2012 at 11:02 AM, Noah Watkins <jayhawk@cs.ucsc.edu> wrote:
>> On Thu, Sep 6, 2012 at 8:42 AM, Sage Weil <sage@inktank.com> wrote:
>>>
>>> Also, I noticed the automake patch removes CephException.java, added in
>>> the previous patch... probably an accident?
>>
>> I left CephException out intentionally because it could be replaced by
>> generic exceptions in Java like IOException or FileNotFoundException.
>> My belief is that CephException (and specializations of this) will
>> need to be re-introduced as more error cases are covered. For example,
>> I think we'll want a CephBadFileDescriptor, but currently libcephfs
>> doesn't appear to return -EBADF (the client is crashing do to fd_map
>> assert). So, the Java wrappers should be as stable as the C API, but
>> both seem to need some loose ends tied up.
>>
>>> Can't wait to pull this in!  BTW, Noah, do you know if this is still an
>>> issue?
>>>
>>>         http://tracker.newdream.net/issues/2778
>>
>> It does appear that -ENOENT is now returned. I added a unit test that
>> expects FileNotFoundException and that works out nicely.
>>
>> - Noah
> --
> 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-03 19:39       ` Sage Weil
@ 2012-10-04  4:23         ` Laszlo Boszormenyi (GCS)
  2012-10-04 20:24         ` James Page
  1 sibling, 0 replies; 16+ messages in thread
From: Laszlo Boszormenyi (GCS) @ 2012-10-04  4:23 UTC (permalink / raw)
  To: Sage Weil; +Cc: Noah Watkins, Joe Buck, ceph-devel

On Wed, 2012-10-03 at 12:39 -0700, Sage Weil wrote:
> On Wed, 3 Oct 2012, Noah Watkins wrote:
> > I wanted to touch base on this Java bindings patch series to make sure
> > this can become a solid foundation for the Hadoop shim clean-up. Were
> > there any specific issues with this, other than not yet having a major
> > consumer?
> 
> From my perspective it's ready.  I was hoping that Laszlo could look at 
> the packaging bits before I merged, but then I lost track of it.
> 
> Laszlo, do you have a minute to take a look?
 I was too busy with IRL and stuff. But sounds interesting. Will check
this in the afternoon and report back.

Laszlo/GCS


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-03 19:39       ` Sage Weil
  2012-10-04  4:23         ` Laszlo Boszormenyi (GCS)
@ 2012-10-04 20:24         ` James Page
  2012-10-04 22:00           ` Laszlo Boszormenyi (GCS)
  2012-10-05  7:10           ` James Page
  1 sibling, 2 replies; 16+ messages in thread
From: James Page @ 2012-10-04 20:24 UTC (permalink / raw)
  To: Sage Weil; +Cc: gcs, Noah Watkins, Joe Buck, ceph-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 03/10/12 20:39, Sage Weil wrote:
> On Wed, 3 Oct 2012, Noah Watkins wrote:
>>> Hi Sage,
>>> 
>>> I wanted to touch base on this Java bindings patch series to
>>> make sure this can become a solid foundation for the Hadoop
>>> shim clean-up. Were there any specific issues with this, other
>>> than not yet having a major consumer?
> From my perspective it's ready.  I was hoping that Laszlo could
> look at the packaging bits before I merged, but then I lost track
> of it.
> 
> Laszlo, do you have a minute to take a look?

Laszlo - hope you don't mind me jumping in but Java packaging is
something I have quite a bit of experience with.

A few bits of feedback:

1) Split of Java bytecode and native JNI code

Inline with
http://www.debian.org/doc/packaging-manuals/java-policy/x104.html, the
native JNI code should be in a separate, arch-specific, package to the
Java bytecode (which ideally should be arch: all).

  libceph-java Depends -> libceph-jni

The only reason I could think of to not do this would be to exclude
architectures in Debian for which ceph does not build from having a
Java arch: all package which is un-installable.

2) libceph1-java naming

As ceph is the only source package likely to produce this code the
version is really not required as this is simply to prevent conflicts
when multiple versions of a Java library are required - libceph-java
is just fine.

3) jar files in /usr/share/java

Java policy dictates a versioned and unversioned jar in /usr/share/java:

/usr/share/java/ceph-0.48.2.jar
/usr/share/java/ceph.jar -> ceph-0.48.2.jar

Tools such as javahelper can do this for you - which I see on the BD's.

Use debian/libceph-java.jlibs + plumb jh_installlibs into debian/rules
and javahelper will do this for you.

4) src/java/build.xml

Please set the source/target version of Java to something sensible
during the build process - ideally 1.5 (as 1.6 introduced no new
language features).  Ubuntu quantal's default-jdk is OpenJDK7 -
without this it will build code which is not backwards compatible.

And openjdk-6/oracle java 6 is still available...

HTH

Cheers

James

- -- 
James Page
Ubuntu Core Developer
Debian Maintainer
james.page@ubuntu.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBCAAGBQJQbfCbAAoJEL/srsug59jDt0AP/RNkUopLnHuumgyfvaqoH3EI
1FYGlwBb4x5KqaBF0gfzSOl4TlLtQlNUMjScsIaFQmIzVuQxyj/JrtmSyLO1nAu2
udNg0kBFErYbf6oxvJPo3bFBqsRzIQnpLtjjLXl39h83Iw7YhNnxwORD8C7ofrBG
yzt3ugXE5lmJYb/TPWompJZiVKi2G7XXJuO3psv4Qp4I0DKwjNQc0nHK1EA7vwFB
eMyVCzK0kfvNSpoLI3/N9U7k3Hpgx0i72pKNzF0aZj13dqJx8WXgbfoXRSmd68Ut
4Ao/UWsxHakYs6DwvHY5MD9OZuLbLtfey9nNi+sciEdolq4tO9Halpu4sUJlCrQg
iGDq8SF+yg2oulM09rxbUBhs9hU7DdPFPNibH7M7nsRKjI8SVAoT8RVtzY9kAZOd
x0GluRa++IsRwyw2I9xYvcHVg0+TeMHEsGeNOHQ9OjfSXWIG45J9htL3BE8w6vXp
PsLRerW/k6DDXffKL9EJSstsJ5oRc3T/FMmnswB8eEugZ/4hKoE9lWwFqkwJp/WV
7HB7DlC9JEMNCf4Wvr7RYQs8JcSh94ERq0LCX2L/BWjwHdqUU8votrKGnHbjBA/o
N1eK++qVqdKRc6CyauYuo33VsR6wrCyo5GZeUiH389nJ/P+ov+v7T7dFrcqzLyaP
PCRKRQ09ADFakFOVx+Qv
=ZkNY
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-04 20:24         ` James Page
@ 2012-10-04 22:00           ` Laszlo Boszormenyi (GCS)
  2012-10-05 12:13             ` Noah Watkins
  2012-10-05  7:10           ` James Page
  1 sibling, 1 reply; 16+ messages in thread
From: Laszlo Boszormenyi (GCS) @ 2012-10-04 22:00 UTC (permalink / raw)
  To: James Page; +Cc: Sage Weil, Noah Watkins, Joe Buck, ceph-devel

On Thu, 2012-10-04 at 21:24 +0100, James Page wrote:
> On 03/10/12 20:39, Sage Weil wrote:
> > Laszlo, do you have a minute to take a look?
> 
> Laszlo - hope you don't mind me jumping in but Java packaging is
> something I have quite a bit of experience with.
 No problem, I second your overview.
Sage, Noah, do you make the necessary changes or James or me should do
it?

Laszlo/GCS


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-04 20:24         ` James Page
  2012-10-04 22:00           ` Laszlo Boszormenyi (GCS)
@ 2012-10-05  7:10           ` James Page
  1 sibling, 0 replies; 16+ messages in thread
From: James Page @ 2012-10-05  7:10 UTC (permalink / raw)
  To: Sage Weil; +Cc: gcs, Noah Watkins, Joe Buck, ceph-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 04/10/12 21:24, James Page wrote:
> 4) src/java/build.xml
> 
> Please set the source/target version of Java to something sensible 
> during the build process - ideally 1.5 (as 1.6 introduced no new 
> language features).  Ubuntu quantal's default-jdk is OpenJDK7 - 
> without this it will build code which is not backwards compatible.

Actually this last point applies to both the Makefile and the
build.xml - missed that during my first review.

- -- 
James Page
Technical Lead
Ubuntu Server and Cloud Workloads Team
james.page@canonical.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBCAAGBQJQbofoAAoJEL/srsug59jDa6oQAK7jU8OLuwcn5cTliIV5XD+k
3fkVNLKZ09TeRv8HsDv4DFGcmZdVUxE0AxMnby2ANei+Nn5wGWhQp11h6g8mk2G3
eUOvAOaG8K/fPEl+6gG3HXw7okivKw9FjkxE3/H3yC3vJ4kJVunKcH6a4aN4mSYn
EddD5cT9jHT9ka1pKzel2F2dzSOp0sOwqgs0kN4H+QlVB/vQ6olNY1PvaAC7q39o
MTEHQ/3iI0KvDxWHlETrrzcSDeyN9g0/j8yUuY00DuLSsXacieWtJoN89ZuElUBh
Ma8SXNMBSRvmdUvQzBgmFjQFlNffyRY7xNftMSFPUGkp22ZQWU/tdbNmHkr/wBdB
KG4TtCrM8NVtxieXLcUsYltioKLj0On208vK5Dro/PpaDnWTmkKA1p6wUtJMX38m
7HjjWo/JS8xZ2/9UTxD4ScjTrZLuGmesJ5zPEgB9CLOMq+9yoF7e2K3qeIdRA4mF
IiMCXp5PaC57xYLBmTbz/zyJSSdEX+7e2bTUErgpKIzTehjzIeAfFXsRoPnunQWF
08X0fIyTRKrMimkextTxvqHCjiN8xF6NtzOz1x5kuQVCcuay3iKAXriYLBvU1KsO
0wR6aNj+9bobVj2uUZ3BKNDrzzwCs+/UOiz2YnYJnJtGRzMH3Bu3g8RVjxZwYlL8
Xk7hykl3tOL8f5aGV6JL
=kXxN
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-04 22:00           ` Laszlo Boszormenyi (GCS)
@ 2012-10-05 12:13             ` Noah Watkins
  2012-10-10 22:00               ` Noah Watkins
  0 siblings, 1 reply; 16+ messages in thread
From: Noah Watkins @ 2012-10-05 12:13 UTC (permalink / raw)
  To: Laszlo Boszormenyi (GCS); +Cc: James Page, Sage Weil, Joe Buck, ceph-devel

On Thu, Oct 4, 2012 at 3:00 PM, Laszlo Boszormenyi (GCS) <gcs@debian.hu> wrote:
> On Thu, 2012-10-04 at 21:24 +0100, James Page wrote:
>> On 03/10/12 20:39, Sage Weil wrote:
>> > Laszlo, do you have a minute to take a look?
>>
>> Laszlo - hope you don't mind me jumping in but Java packaging is
>> something I have quite a bit of experience with.
>  No problem, I second your overview.
> Sage, Noah, do you make the necessary changes or James or me should do
> it?

Laszlo, I can take a run at these changes.

Thanks,
Noah

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-05 12:13             ` Noah Watkins
@ 2012-10-10 22:00               ` Noah Watkins
  2012-10-11  0:53                 ` Laszlo Boszormenyi (GCS)
  0 siblings, 1 reply; 16+ messages in thread
From: Noah Watkins @ 2012-10-10 22:00 UTC (permalink / raw)
  To: Laszlo Boszormenyi (GCS); +Cc: James Page, Sage Weil, Joe Buck, ceph-devel

Laszlo, James:

Changes based on your previous feedback are ready for review. I pushed the changes here:

  git://github.com/noahdesu/ceph.git wip-java-cephfs

Thanks!
- Noah

From 0d8c4dc39f9b8f2e264bb2503c053418ad72b705 Mon Sep 17 00:00:00 2001
From: Noah Watkins <noahwatkins@gmail.com>
Date: Wed, 10 Oct 2012 13:57:03 -0700
Subject: [PATCH] java: update deb bits from ceph-devel feedback

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
---
 debian/.gitignore            |    3 ++-
 debian/control               |   10 ++++++++--
 debian/libceph-java.jlibs    |    1 +
 debian/libceph-jni.install   |    1 +
 debian/libceph1-java.install |    2 --
 debian/rules                 |    1 +
 src/java/.gitignore          |    2 +-
 src/java/Makefile.am         |    8 ++++----
 src/java/README              |    2 +-
 src/java/build.xml           |    6 +++---
 10 files changed, 22 insertions(+), 14 deletions(-)
 create mode 100644 debian/libceph-java.jlibs
 create mode 100644 debian/libceph-jni.install
 delete mode 100644 debian/libceph1-java.install

diff --git a/debian/.gitignore b/debian/.gitignore
index c5b73ce..2fd5a05 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -30,5 +30,6 @@
 /rest-bench-dbg
 /rest-bench
 /python-ceph
-/libceph1-java
+/libceph-java
+/libceph-jni
 /tmp
diff --git a/debian/control b/debian/control
index 579855f..62c85d9 100644
--- a/debian/control
+++ b/debian/control
@@ -319,8 +319,14 @@ Description: Python libraries for the Ceph distributed filesystem
  This package contains Python libraries for interacting with Ceph's
  RADOS object storage, and RBD (RADOS block device).
 
-Package: libceph1-java
+Package: libceph-java
 Section: java
+Architecture: all
+Depends: libceph-jni, ${java:Depends}, ${misc:Depends}
+Description: Java libraries for the Ceph File System.
+
+Package: libceph-jni
 Architecture: linux-any
+Section: libs
 Depends: libcephfs1, ${shlibs:Depends}, ${java:Depends}, ${misc:Depends}
-Description: Java libraries for the Ceph File System
+Description: Java Native Interface library for CephFS Java bindings.
diff --git a/debian/libceph-java.jlibs b/debian/libceph-java.jlibs
new file mode 100644
index 0000000..952a190
--- /dev/null
+++ b/debian/libceph-java.jlibs
@@ -0,0 +1 @@
+src/java/ceph.jar
diff --git a/debian/libceph-jni.install b/debian/libceph-jni.install
new file mode 100644
index 0000000..072b990
--- /dev/null
+++ b/debian/libceph-jni.install
@@ -0,0 +1 @@
+usr/lib/libcephfs_jni.so* usr/lib/jni
diff --git a/debian/libceph1-java.install b/debian/libceph1-java.install
deleted file mode 100644
index 98133e4..0000000
--- a/debian/libceph1-java.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/libcephfs_jni.so* usr/lib/jni
-usr/lib/libcephfs.jar usr/share/java
diff --git a/debian/rules b/debian/rules
index b848ddc..6d61385 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,6 +93,7 @@ install: build
 # Add here commands to install the package into debian/testpack.
 # Build architecture-independent files here.
 binary-indep: build install
+	jh_installlibs -v -i
 
 # We have nothing to do by default.
 # Build architecture-dependent files here.
diff --git a/src/java/.gitignore b/src/java/.gitignore
index 8208e2b..b8eb0e9 100644
--- a/src/java/.gitignore
+++ b/src/java/.gitignore
@@ -1,4 +1,4 @@
 *.class
-libcephfs.jar
+ceph.jar
 native/com_ceph_fs_CephMount.h
 TEST-*.txt
diff --git a/src/java/Makefile.am b/src/java/Makefile.am
index 5c54f36..87d763d 100644
--- a/src/java/Makefile.am
+++ b/src/java/Makefile.am
@@ -24,20 +24,20 @@ CEPH_PROXY=java/com/ceph/fs/CephMount.class
 
 $(CEPH_PROXY): $(JAVA_SRC)
 	export CLASSPATH=java/ ;
-	$(JAVAC) java/com/ceph/fs/*.java
+	$(JAVAC) -source 1.5 -target 1.5 java/com/ceph/fs/*.java
 
 $(JAVA_H): $(CEPH_PROXY)
 	export CLASSPATH=java/ ; \
 	$(JAVAH) -jni -o $@ com.ceph.fs.CephMount
 
-libcephfs.jar: $(CEPH_PROXY)
+ceph.jar: $(CEPH_PROXY)
 	$(JAR) cf $@ $(JAVA_CLASSES:%=-C java %) # $(ESCAPED_JAVA_CLASSES:%=-C java %)
 
 javadir = $(libdir)
-java_DATA = libcephfs.jar
+java_DATA = ceph.jar
 
 BUILT_SOURCES = $(JAVA_H)
 
-CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar
+CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) ceph.jar
 
 endif
diff --git a/src/java/README b/src/java/README
index ca39a44..d58ab8a 100644
--- a/src/java/README
+++ b/src/java/README
@@ -33,7 +33,7 @@ Ant is used to run the unit test (apt-get install ant). For example:
 
 1. The tests depend on the compiled wrappers. If the wrappers are installed as
 part of a package (e.g. Debian package) then this should 'just work'. Ant will
-also look in the current directory for 'libcephfs.jar' and in ../.libs for the
+also look in the current directory for 'ceph.jar' and in ../.libs for the
 JNI library.  If all else fails, set the environment variables CEPHFS_JAR, and
 CEPHFS_JNI_LIB accordingly.
 
diff --git a/src/java/build.xml b/src/java/build.xml
index f846ca4..203ffc0 100644
--- a/src/java/build.xml
+++ b/src/java/build.xml
@@ -31,10 +31,10 @@
 
 	<target name="compile-tests" depends="makedir">
         <javac srcdir="${test.src.dir}" destdir="${test.build.dir}"
-            includeantruntime="false">
+            includeantruntime="false" source="1.5" target="1.5">
             <classpath>
 				<pathelement location="${env.CEPHFS_JAR}"/>
-				<pathelement location="libcephfs.jar"/>
+				<pathelement location="ceph.jar"/>
                 <fileset dir="${lib.dir}">
                     <include name="**/*.jar"/>
                 </fileset>
@@ -51,7 +51,7 @@
                     <include name="**/*.jar"/>
                 </fileset>
 				<pathelement location="${env.CEPHFS_JAR}"/>
-				<pathelement location="libcephfs.jar"/>
+				<pathelement location="ceph.jar"/>
                 <pathelement path="${test.build.dir}"/>
                 <pathelement path="${test.src.dir}"/>
             </classpath>

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-10 22:00               ` Noah Watkins
@ 2012-10-11  0:53                 ` Laszlo Boszormenyi (GCS)
  2012-10-11  1:36                   ` Noah Watkins
  0 siblings, 1 reply; 16+ messages in thread
From: Laszlo Boszormenyi (GCS) @ 2012-10-11  0:53 UTC (permalink / raw)
  To: Noah Watkins; +Cc: James Page, Sage Weil, Joe Buck, ceph-devel

Hi Noah,

On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
> Laszlo, James:
> 
> Changes based on your previous feedback are ready for review. I pushed the changes here:
> 
>   git://github.com/noahdesu/ceph.git wip-java-cephfs
 Checking only the diff, as it's 3 am here. It looks quite OK. But will
check it further in the afternoon.

Laszlo/GCS


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-11  0:53                 ` Laszlo Boszormenyi (GCS)
@ 2012-10-11  1:36                   ` Noah Watkins
  2012-10-17 22:45                     ` Sage Weil
  0 siblings, 1 reply; 16+ messages in thread
From: Noah Watkins @ 2012-10-11  1:36 UTC (permalink / raw)
  To: Laszlo Boszormenyi (GCS); +Cc: James Page, Sage Weil, Joe Buck, ceph-devel

On Wed, Oct 10, 2012 at 5:53 PM, Laszlo Boszormenyi (GCS) <gcs@debian.hu> wrote:
> Hi Noah,
>
> On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
>> Laszlo, James:
>>
>> Changes based on your previous feedback are ready for review. I pushed the changes here:
>>
>>   git://github.com/noahdesu/ceph.git wip-java-cephfs
>  Checking only the diff, as it's 3 am here. It looks quite OK. But will
> check it further in the afternoon.

Ok, great. The one thing I was most curious about is if the ceph.jar
reference in debian/libceph-java.jlibs is correct. Previously I was
able to reference its installation path within debian/tmp
(usr/lib/ceph.jar), but jh_installlibs was only able to find the jar
when I referenced its build location (src/java/ceph.jar).

Thanks!

>
> Laszlo/GCS
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-11  1:36                   ` Noah Watkins
@ 2012-10-17 22:45                     ` Sage Weil
  2012-10-19 17:27                       ` Noah Watkins
  0 siblings, 1 reply; 16+ messages in thread
From: Sage Weil @ 2012-10-17 22:45 UTC (permalink / raw)
  To: Noah Watkins; +Cc: Laszlo Boszormenyi (GCS), James Page, Joe Buck, ceph-devel

On Wed, 10 Oct 2012, Noah Watkins wrote:
> On Wed, Oct 10, 2012 at 5:53 PM, Laszlo Boszormenyi (GCS) <gcs@debian.hu> wrote:
> > Hi Noah,
> >
> > On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
> >> Laszlo, James:
> >>
> >> Changes based on your previous feedback are ready for review. I pushed the changes here:
> >>
> >>   git://github.com/noahdesu/ceph.git wip-java-cephfs
> >  Checking only the diff, as it's 3 am here. It looks quite OK. But will
> > check it further in the afternoon.
> 
> Ok, great. The one thing I was most curious about is if the ceph.jar
> reference in debian/libceph-java.jlibs is correct. Previously I was
> able to reference its installation path within debian/tmp
> (usr/lib/ceph.jar), but jh_installlibs was only able to find the jar
> when I referenced its build location (src/java/ceph.jar).

Laszlo, any comment there?

Also, I have one question: this packages up libcephfs bindings in 
libceph-java.  Should that be libcephfs-java, or should be put *all* ceph 
lib bindings in here (libcephfs, librados, librbd)?

sage

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [GIT PULL v5] java: add libcephfs Java bindings
  2012-10-17 22:45                     ` Sage Weil
@ 2012-10-19 17:27                       ` Noah Watkins
  0 siblings, 0 replies; 16+ messages in thread
From: Noah Watkins @ 2012-10-19 17:27 UTC (permalink / raw)
  To: Sage Weil; +Cc: Laszlo Boszormenyi (GCS), James Page, Joe Buck, ceph-devel

On Wed, Oct 17, 2012 at 3:45 PM, Sage Weil <sage@inktank.com> wrote:
>
> Also, I have one question: this packages up libcephfs bindings in
> libceph-java.  Should that be libcephfs-java, or should be put *all* ceph
> lib bindings in here (libcephfs, librados, librbd)?

Pushed changes that build packages:

  libcephfs-java and libcephfs-jni

to git://github.com/noahdesu/ceph.git wip-java-cephfs

  rebased to master.

- Noah

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-10-19 17:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06  3:26 [GIT PULL v5] java: add libcephfs Java bindings Noah Watkins
2012-09-06 15:42 ` Sage Weil
2012-09-06 18:02   ` Noah Watkins
2012-10-03 19:34     ` Noah Watkins
2012-10-03 19:39       ` Sage Weil
2012-10-04  4:23         ` Laszlo Boszormenyi (GCS)
2012-10-04 20:24         ` James Page
2012-10-04 22:00           ` Laszlo Boszormenyi (GCS)
2012-10-05 12:13             ` Noah Watkins
2012-10-10 22:00               ` Noah Watkins
2012-10-11  0:53                 ` Laszlo Boszormenyi (GCS)
2012-10-11  1:36                   ` Noah Watkins
2012-10-17 22:45                     ` Sage Weil
2012-10-19 17:27                       ` Noah Watkins
2012-10-05  7:10           ` James Page
2012-10-03 21:26       ` Gregory Farnum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.