зеркало из https://github.com/Azure/YCSB.git
[orientdb] Fixed problem with non windows paths
This commit is contained in:
Родитель
ad6735fe3a
Коммит
2a47c244fa
|
@ -28,7 +28,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.orientechnologies</groupId>
|
<groupId>com.orientechnologies</groupId>
|
||||||
<artifactId>orientdb-core</artifactId>
|
<artifactId>orientdb-core</artifactId>
|
||||||
<version>1.7.5-SNAPSHOT</version>
|
<version>1.7.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -28,16 +28,16 @@ import java.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OrientDB client for YCSB framework.
|
* OrientDB client for YCSB framework.
|
||||||
*
|
*
|
||||||
* Properties to set:
|
* Properties to set:
|
||||||
*
|
*
|
||||||
* orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br>
|
* orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br>
|
||||||
* orientdb.database=ycsb <br>
|
* orientdb.database=ycsb <br>
|
||||||
* orientdb.user=admin <br>
|
* orientdb.user=admin <br>
|
||||||
* orientdb.password=admin <br>
|
* orientdb.password=admin <br>
|
||||||
*
|
*
|
||||||
* @author Luca Garulli
|
* @author Luca Garulli
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class OrientDBClient extends DB {
|
public class OrientDBClient extends DB {
|
||||||
|
|
||||||
|
@ -52,7 +52,12 @@ public class OrientDBClient extends DB {
|
||||||
// initialize OrientDB driver
|
// initialize OrientDB driver
|
||||||
Properties props = getProperties();
|
Properties props = getProperties();
|
||||||
|
|
||||||
String url = props.getProperty("orientdb.url", "plocal:C:/temp/databases/ycsb");
|
String url;
|
||||||
|
if (System.getProperty("os.name").toLowerCase().contains("win"))
|
||||||
|
url = props.getProperty("orientdb.url", "plocal:C:/temp/databases/ycsb");
|
||||||
|
else
|
||||||
|
url = props.getProperty("orientdb.url", "plocal:/temp/databases/ycsb");
|
||||||
|
|
||||||
String user = props.getProperty("orientdb.user", "admin");
|
String user = props.getProperty("orientdb.user", "admin");
|
||||||
String password = props.getProperty("orientdb.password", "admin");
|
String password = props.getProperty("orientdb.password", "admin");
|
||||||
Boolean newdb = Boolean.parseBoolean(props.getProperty("orientdb.newdb", "false"));
|
Boolean newdb = Boolean.parseBoolean(props.getProperty("orientdb.newdb", "false"));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче