From 043c96884348cac485552ce631e92fd7f16d6bf7 Mon Sep 17 00:00:00 2001 From: Jaemyoun <jaemyoun@gmail.com> Date: Sat, 26 Mar 2016 19:55:07 +0900 Subject: [PATCH] Downgraded rados-java to 0.2.0 from 0.3.0-SNAPSHOT --- rados/pom.xml | 11 ++++++----- .../src/main/java/com/yahoo/ycsb/db/RadosClient.java | 8 ++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/rados/pom.xml b/rados/pom.xml index d71e8470..d57290d0 100644 --- a/rados/pom.xml +++ b/rados/pom.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- +<!-- Copyright (c) 2016 YCSB contributors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you @@ -24,16 +24,17 @@ LICENSE file. <version>0.8.0-SNAPSHOT</version> <relativePath>../binding-parent</relativePath> </parent> - + <artifactId>rados-binding</artifactId> <name>rados of Ceph FS binding</name> <packaging>jar</packaging> - + <dependencies> <dependency> <groupId>com.ceph</groupId> <artifactId>rados</artifactId> - <version>${rados.version}</version> + <!-- <version>${rados.version}</version> --> + <version>0.2.0</version> </dependency> <dependency> <groupId>com.yahoo.ycsb</groupId> @@ -47,7 +48,7 @@ LICENSE file. <version>${json.version}</version> </dependency> </dependencies> - + <properties> <rados.version>0.3.0-SNAPSHOT</rados.version> <json.version>20160212</json.version> diff --git a/rados/src/main/java/com/yahoo/ycsb/db/RadosClient.java b/rados/src/main/java/com/yahoo/ycsb/db/RadosClient.java index 358bb991..e0d63ff1 100644 --- a/rados/src/main/java/com/yahoo/ycsb/db/RadosClient.java +++ b/rados/src/main/java/com/yahoo/ycsb/db/RadosClient.java @@ -101,8 +101,12 @@ public class RadosClient extends DB { ReadOp rop = ioctx.readOpCreate(); ReadResult readResult = rop.queueRead(0, info.getSize()); // TODO: more size than byte length possible; - rop.operate(key, Rados.OPERATION_NOFLAG); - readResult.raiseExceptionOnError("Error ReadOP(%d)", readResult.getRVal()); + // rop.operate(key, Rados.OPERATION_NOFLAG); // for rados-java 0.3.0 + rop.operate(key, 0); + // readResult.raiseExceptionOnError("Error ReadOP(%d)", readResult.getRVal()); // for rados-java 0.3.0 + if (readResult.getRVal() < 0) { + throw new RadosException("Error ReadOP", readResult.getRVal()); + } if (info.getSize() != readResult.getBytesRead()) { return new Status("ERROR", "Error the object size read"); } -- GitLab