Skip to content

Commit 2a47c24

Browse files
lvcabusbey
authored andcommitted
[orientdb] Fixed problem with non windows paths
1 parent ad6735f commit 2a47c24

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

orientdb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.orientechnologies</groupId>
3030
<artifactId>orientdb-core</artifactId>
31-
<version>1.7.5-SNAPSHOT</version>
31+
<version>1.7.5</version>
3232
</dependency>
3333
</dependencies>
3434
</project>

orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828

2929
/**
3030
* OrientDB client for YCSB framework.
31-
*
31+
*
3232
* Properties to set:
33-
*
33+
*
3434
* orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br>
3535
* orientdb.database=ycsb <br>
3636
* orientdb.user=admin <br>
3737
* orientdb.password=admin <br>
38-
*
38+
*
3939
* @author Luca Garulli
40-
*
40+
*
4141
*/
4242
public class OrientDBClient extends DB {
4343

@@ -52,7 +52,12 @@ public void init() throws DBException {
5252
// initialize OrientDB driver
5353
Properties props = getProperties();
5454

55-
String url = props.getProperty("orientdb.url", "plocal:C:/temp/databases/ycsb");
55+
String url;
56+
if (System.getProperty("os.name").toLowerCase().contains("win"))
57+
url = props.getProperty("orientdb.url", "plocal:C:/temp/databases/ycsb");
58+
else
59+
url = props.getProperty("orientdb.url", "plocal:/temp/databases/ycsb");
60+
5661
String user = props.getProperty("orientdb.user", "admin");
5762
String password = props.getProperty("orientdb.password", "admin");
5863
Boolean newdb = Boolean.parseBoolean(props.getProperty("orientdb.newdb", "false"));

0 commit comments

Comments
 (0)