Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adnan Ahmad
YCSB
Commits
4625bede
Commit
4625bede
authored
9 years ago
by
Andy Kruth
Browse files
Options
Downloads
Patches
Plain Diff
[orientdb] Created intent property
parent
04f109ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
orientdb/README.md
+6
-0
6 additions, 0 deletions
orientdb/README.md
orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java
+19
-1
19 additions, 1 deletion
orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java
with
25 additions
and
1 deletion
orientdb/README.md
+
6
−
0
View file @
4625bede
...
...
@@ -51,6 +51,12 @@ See the next section for the list of configuration parameters for OrientDB.
*
```orientdb.newdb```
- Overwrite the database if it already exists.
*
Only effects the
```load```
phase.
*
Default:
```false```
*
```orientdb.intent```
- Declare an Intent to the database.
*
This is an optimization feature provided by OrientDB: http://orientdb.com/docs/2.1/Performance-Tuning.html#massive-insertion
*
Possible values are:
*
massiveinsert
*
massiveread
*
nocache
*
```orientdb.remote.storagetype```
- Storage type of the database on remote server
*
This is only required if using a
```remote:```
connection url
...
...
This diff is collapsed.
Click to expand it.
orientdb/src/main/java/com/yahoo/ycsb/db/OrientDBClient.java
+
19
−
1
View file @
4625bede
...
...
@@ -27,6 +27,8 @@ import com.orientechnologies.orient.core.dictionary.ODictionary;
import
com.orientechnologies.orient.core.exception.ODatabaseException
;
import
com.orientechnologies.orient.core.index.OIndexCursor
;
import
com.orientechnologies.orient.core.intent.OIntentMassiveInsert
;
import
com.orientechnologies.orient.core.intent.OIntentMassiveRead
;
import
com.orientechnologies.orient.core.intent.OIntentNoCache
;
import
com.orientechnologies.orient.core.record.ORecord
;
import
com.orientechnologies.orient.core.record.impl.ODocument
;
import
com.yahoo.ycsb.ByteIterator
;
...
...
@@ -67,10 +69,16 @@ public class OrientDBClient extends DB {
private
static
final
String
STORAGE_TYPE_PROPERTY
=
"orientdb.remote.storagetype"
;
private
static
final
String
INTENT_PROPERTY
=
"orientdb.intent"
;
private
static
final
String
INTENT_PROPERTY_DEFAULT
=
""
;
private
static
final
String
DO_TRANSACTIONS_PROPERTY
=
"dotransactions"
;
private
static
final
String
DO_TRANSACTIONS_PROPERTY_DEFAULT
=
"true"
;
private
static
final
String
ORIENTDB_DOCUMENT_TYPE
=
"document"
;
private
static
final
String
ORIENTDB_MASSIVEINSERT
=
"massiveinsert"
;
private
static
final
String
ORIENTDB_MASSIVEREAD
=
"massiveread"
;
private
static
final
String
ORIENTDB_NOCACHE
=
"nocache"
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
getClass
());
...
...
@@ -83,6 +91,7 @@ public class OrientDBClient extends DB {
String
password
=
props
.
getProperty
(
PASSWORD_PROPERTY
,
PASSWORD_PROPERTY_DEFAULT
);
Boolean
newdb
=
Boolean
.
parseBoolean
(
props
.
getProperty
(
NEWDB_PROPERTY
,
NEWDB_PROPERTY_DEFAULT
));
String
remoteStorageType
=
props
.
getProperty
(
STORAGE_TYPE_PROPERTY
);
String
intent
=
props
.
getProperty
(
INTENT_PROPERTY
,
INTENT_PROPERTY_DEFAULT
);
Boolean
dotransactions
=
Boolean
.
parseBoolean
(
props
.
getProperty
(
DO_TRANSACTIONS_PROPERTY
,
DO_TRANSACTIONS_PROPERTY_DEFAULT
));
...
...
@@ -144,7 +153,16 @@ public class OrientDBClient extends DB {
db
.
getMetadata
().
getSchema
().
createClass
(
CLASS
);
}
db
.
declareIntent
(
new
OIntentMassiveInsert
());
if
(
intent
.
equals
(
ORIENTDB_MASSIVEINSERT
))
{
log
.
info
(
"Declaring intent of MassiveInsert."
);
db
.
declareIntent
(
new
OIntentMassiveInsert
());
}
else
if
(
intent
.
equals
(
ORIENTDB_MASSIVEREAD
))
{
log
.
info
(
"Declaring intent of MassiveRead."
);
db
.
declareIntent
(
new
OIntentMassiveRead
());
}
else
if
(
intent
.
equals
(
ORIENTDB_NOCACHE
))
{
log
.
info
(
"Declaring intent of NoCache."
);
db
.
declareIntent
(
new
OIntentNoCache
());
}
}
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment