summaryrefslogtreecommitdiffstats
path: root/src/java (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test,qa: s/.libs/lib/Kefu Chai2018-06-262-3/+3
| | | | | | | after switching to cmake, the libraries are put in build/lib, instead of .libs. so point the default settings to ".lib". Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: bump up JDK version to 1.8Kefu Chai2018-05-041-1/+1
| | | | | | | | as JDK 7 is EOL. see http://www.oracle.com/technetwork/java/eol-135779.html and https://www.java.com/en/download/faq/java_7.xml Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: use javac -h for creating JNI native headersKefu Chai2018-05-041-11/+14
| | | | | | | | JDK 1.10 does not offer javah anymore, so we need to use "javac -h" or add_jar(... GENERATE_NATIVE_HEADERS) instead. Fixes: http://tracker.ceph.com/issues/24012 Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: bump target jdk to 1.7Shengjing Zhu2018-03-281-3/+3
| | | | | | | | | | | | | | jdk 1.7 was released on 2011. For CentOS 6/7, both have openjdk 1.8. For Debian 8(jessie), Ubuntu 14.04(trusty) have openjdk 1.7. These are the oldest distributions officially built for during luminous release. Since jdk 1.9/9, the minimal supported version is 1.6/6. jdk 1.0/10(recently released) only supports 1.7/7. http://openjdk.java.net/jeps/182 Fixes: http://tracker.ceph.com/issues/23458 Signed-off-by: Shengjing Zhu <zhsj@umcloud.com>
* misc: fix various spelling errorsShengjing Zhu2018-03-101-1/+1
| | | | Signed-off-by: Shengjing Zhu <i@zhsj.me>
* Merge pull request #20175 from tone-zhang/wip-fix-bug22828Kefu Chai2018-02-011-1/+1
|\ | | | | | | | | cmake: fix libcephfs-test.jar build failure Reviewed-by: Kefu Chai <kchai@redhat.com>
| * cmake: fix libcephfs-test.jar build failureTone Zhang2018-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Ceph Debian installation package, libcephfs-test.jar build would fail if multi junit versions are installed on the host. In src/java/CMakeLists.txt, the "junit" search order is "junit" and then "junit4". In case multi junit versions are installed, the lower version (like 3.8) is found firstly, but junit4 is required only. The search result will cause the failure. Fix the issue by change search order to firstly search junit4 by default. Fixes: http://tracker.ceph.com/issues/22828 Signed-off-by: Tone Zhang <tone.zhang@arm.com>
* | java/native: s/jni: lstat/jni: stat in native_ceph_statShangzhong Zhu2018-01-271-2/+2
|/ | | | Signed-off-by: Shangzhong Zhu <zhu.shangzhong@zte.com.cn>
* cmake: s/LINK_PRIVATE/PRIVATE/Kefu Chai2017-10-131-1/+1
| | | | | | | | as 2.8.12 is required not, no need to be compatible with 2.8.11 anymore. this reverts 457f023. Signed-off-by: Kefu Chai <kchai@redhat.com>
* java/native: Fix: misuse milliseconds to seconds when set mtime or attime in ↵dengquan2017-09-061-3/+7
| | | | | | java Signed-off-by: dengquan <dqdq1023@hotmail.com>
* Client: Add function "get_default_data_pool_name" for java clientdongdong2017-07-292-0/+61
| | | | | | | | Fix: now java client trying to get the default pool througth the root dir "/", but the thing is when java client is mounted to a sub dir and the sub dir's pool_id is always -1, this will cause unexpected failure. Signed-off-by: dongdong tao <tdd21151186@gmail.com>
* cmake: turn libcommon into a shared libraryKefu Chai2017-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | prior to this change, libcommon is a convenient library which gets linked into librados, librbd and libcephfs and all ceph executables. this incurs some problems: - double dose of libcommon in memory space and HDD: waste of memory and disk space. - if an application links to two libraries including libcommon at the same time. take librados and libcephfs as an example, they could interfere with each other by changing the other guy's status. after this change, libcommon is tuned into a shared library and renamed to libceph-common. it will be installed into $prefix/lib/ceph, and packaged in librados2. ceph.spec.in,debian/librados2.install: package libceph-common in librados2. CMakeLists.txt: - do not link against libboost-* if not necessary. - s/common/ceph-common/g - install libceph-common into $prefix/lib/ceph - set rpath to $prefix/lib/ceph - link against ceph-common if an executable needs access to non public symbols in ceph. Signed-off-by: Kefu Chai <kchai@redhat.com>
* client: convert ceph_setattr callers to ceph_setattrxJeff Layton2016-10-121-8/+8
| | | | Signed-off-by: Jeff Layton <jlayton@redhat.com>
* jni: convert libcephfs java bindings to use ceph_statx based APIsJeff Layton2016-10-121-29/+32
| | | | | | | | The java calls themselves are still the same for now. Eventually, it would be good to covert the java API over to something more statx like. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* remove autotoolsSage Weil2016-09-071-87/+0
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* libcephfs: Fix the incorrect integer conversion in libcephfs_jni.ccwenjunhuang2016-08-101-6/+6
| | | | Signed-off-by: wenjunhuang <wenjunhuang@tencent.com>
* cmake: version libcephfs_jniKefu Chai2016-07-021-0/+3
| | | | | | | so we have libcephfs_jni.so.1.0.0 and libcephfs_jni.so.1, which are expected by ceph.spec Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: install lib{rgw,cephfs_jni} into ${CMAKE_INSTALL_LIBDIR} not libKefu Chai2016-07-021-1/+1
| | | | | | | rh and suse distros follows FHS and put amd64 dso libs into lib64 on amd64 machines. so let's use ${CMAKE_INSTALL_LIBDIR} instead Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: add libcephfs-java supportKefu Chai2016-05-242-0/+68
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* java: update libcephfs tests to learn pool nameJohn Spray2016-03-101-12/+20
| | | | | | | Don't assume the data/metadata pools are called "data" and "metadata". Signed-off-by: John Spray <john.spray@redhat.com>
* java: add O_DIRECTORY to libcephfs interfaceJohn Spray2016-03-102-14/+17
| | | | Signed-off-by: John Spray <john.spray@redhat.com>
* java/test: update for libcephfs permission checkYan, Zheng2016-01-122-0/+2
| | | | | | | libcephfs permission check does not allow some operations for non-root userm, disable the permission check for mount tests. Signed-off-by: Yan, Zheng <zyan@redhat.com>
* java: search for JNI bits in common dirsNoah Watkins2015-08-172-8/+70
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: dump extra info for ftruncate assertionNoah Watkins2015-03-281-0/+4
| | | | | | | Nightly ran and encountered a situation in which fstat following ftruncate reported a size not equal to the truncated size. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* Merge remote-tracking branch 'gh/hammer'Sage Weil2015-03-191-1/+7
|\ | | | | | | | | | | | | | | Conflicts: PendingReleaseNotes src/Makefile.am src/gmock src/test/Makefile.am
| * Minor changes in other Makefile.am files to make them support the build ↵Boris Ranto2015-03-061-1/+7
| | | | | | | | refinement
* | Fixed comment (minor)Xavier Roche2015-02-151-1/+1
| |
* | Added CephMount.flock()Xavier Roche2015-02-153-0/+110
|/ | | | Also added corresponding unit tests
* java: fill in stat structure correctlyNoah Watkins2014-10-231-17/+1
| | | | | | | | Added stat filling helper function but only stat and lstat were updated. This patch makes fstat use it. Crucially the fstat wasn't updating the mode flags. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* cephfs-java: build against older jni headersGreg Farnum2014-05-221-1/+1
| | | | | | | | | | Older versions of the JNI interface expected non-const parameters to their memory move functions. It's unpleasant, but won't actually change the memory in question, to do a cast_const in order to satisfy those older headers. (And even if it *did* modify the memory, that would be okay given our single user.) Signed-off-by: Greg Farnum <greg@inktank.com>
* pass '-classpath' option (gcj/javah ignores CLASSPATH environment variable).Dmitry Smirnov2014-05-121-2/+2
| | | | | | | | | | | | | | | | | | | This should not affect OpenJDK which understands '-classpath' as well. With gcj-jdk we still get FTBFS later: ~~~~ java/native/libcephfs_jni.cc:2878:55: error: invalid conversion from 'const jbyte* {aka const signed char*}' to 'jbyte* {aka signed char*}' [-fpermissive] reinterpret_cast<const jbyte*>(rawAddress)); ^ In file included from java/native/libcephfs_jni.cc:27:0: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/jni.h:1471:8: error: initializing argument 4 of 'void _Jv_JNIEnv::SetByteArrayRegion(jbyteArray, jsize, jsize, jbyte*)' [-fpermissive] void SetByteArrayRegion (jbyteArray val0, jsize val1, jsize val2, jbyte * val3) ^ make[5] *** [java/native/libcephfs_jni_la-libcephfs_jni.lo] Error 1 ~~~~ Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
* java/test: ceph.file.layout xattr is still not there nowGreg Farnum2014-03-311-1/+1
| | | | | | | | b8ea65694faf59f12f285a65dc21753dab20ba11 tried to fix this, but missed a spot. Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* java/test: ceph.file.layout xattr is not there nowSage Weil2014-03-291-6/+1
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* Removing extraneous codeJoe Buck2013-09-172-15/+1
| | | | | | | | | | The ExternalResource code was unnecessary and caused issues on CentOS. Removing it. Update Makefile.am to reflect the fact that an anonymous class was removed and its $1.class file is no longer generated. Signed-off-by: Joe Buck <jbbuck@gmail.com>
* libcephfs_jni.cc: reduce scope of ret variableDanny Al-Gaaf2013-05-101-2/+1
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* Makefile: fix java build warningSage Weil2013-04-291-2/+9
| | | | | | | | This is a workaround that makes the warning go away. Not certain there isn't something we should be changing... Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joe Buck <joe.buck@inktank.com>
* java libcephfs: add serialVersionUID to some Exception classesDanny Al-Gaaf2013-03-275-0/+10
| | | | | | | Fix for: "The serializable class does not declare a static final serialVersionUID field" warning. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* CephMount.java: remove unused importDanny Al-Gaaf2013-03-271-1/+0
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* java: fix test name typoNoah Watkins2013-03-261-1/+1
| | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: pretty print Ceph extentNoah Watkins2013-03-241-0/+10
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: support ceph_get_osd_addrNoah Watkins2013-03-246-0/+328
| | | | | | | | | Adds a few JNI utilities from the Android project (license: Apache) to help with IP address conversions. These functions are also updated to work in our environment (use Ceph exception utilities, edit header paths). Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: support ceph_get_osd_crush_locationNoah Watkins2013-03-245-1/+164
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: support ceph_get_file_extent_osdsNoah Watkins2013-03-245-1/+190
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* libcephfs_jni.cc: prefer prefix ++operator for iteratorsDanny Al-Gaaf2013-03-131-3/+3
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* libcephfs_jni.cc: fix indentionDanny Al-Gaaf2013-03-131-273/+273
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* java: make CephMountTest use user.* xattr namesSage Weil2013-02-101-9/+14
| | | | | | | | | | | | Changes to the xattr code in Ceph require a few tweaks to existing test cases. Specifically, there is now a ceph.file.layout xattr by default and user defined xattrs are prepended with "user." Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joe Buck <jbbuck@gmail.com> Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
* java: remove extra whitespaceNoah Watkins2013-01-251-1/+0
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: support ceph_get_file_pool_nameNoah Watkins2013-01-243-0/+95
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: fix exception name typoNoah Watkins2013-01-241-1/+1
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* java: add missing chmod unmounted testNoah Watkins2013-01-241-0/+5
| | | | Signed-off-by: Noah Watkins <noahwatkins@gmail.com>