This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch tinkergraph-storage
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/tinkergraph-storage by this
push:
new d49c57358e Rename graphLocation to storage.directory for
TinkerStorageGraph
d49c57358e is described below
commit d49c57358e77e6865c35e36fd3bfc354c06c1817
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 4 12:43:19 2026 -0400
Rename graphLocation to storage.directory for TinkerStorageGraph
The storage directory is now set with gremlin.tinkergraph.storage.directory,
joining the gremlin.tinkergraph.storage.* settings it is only meaningful
alongside. gremlin.tinkergraph.graphLocation keeps its older meaning of an
interchange file and is now read only by SimpleAuthenticator, which loads
the
credential store from it at startup; the constant is retired from the
TinkerGraph interface since no graph reads it. Also tightens the CHANGELOG
entries for the storage work.
Assisted-by: Claude Code:claude-opus-5
Claude-Session: https://claude.ai/code/session_01KgH2VCpRw57sbFg5GoAiVV
---
CHANGELOG.asciidoc | 6 +++---
.../reference/implementations-tinkergraph.asciidoc | 10 ++++-----
docs/src/upgrade/release-4.x.x.asciidoc | 21 +++++++++++--------
.../conf/tinkergraph-storage.properties | 5 +++--
.../conf/tinkergraph-credentials.properties | 5 +++--
.../conf/tinkerstoragegraph-persistent.properties | 2 +-
.../gremlin/server/auth/SimpleAuthenticator.java | 17 ++++++++++-----
.../tinkergraph/structure/AbstractTinkerGraph.java | 7 ++++++-
.../gremlin/tinkergraph/structure/TinkerGraph.java | 14 ++++++-------
.../tinkergraph/structure/TinkerStorageGraph.java | 10 ++++-----
.../structure/storage/AbstractLogStorage.java | 4 ++--
.../structure/storage/TinkerStorage.java | 2 +-
.../tinkergraph/TinkerStorageGraphProvider.java | 8 ++++----
.../AbstractTinkerStorageConformanceTest.java | 2 +-
.../structure/storage/DirectoryLockTest.java | 2 +-
.../structure/storage/GraphBinaryStorageTest.java | 24 +++++++++++-----------
.../storage/StorageCommitSerializationTest.java | 2 +-
.../storage/StorageCrashConsistencyTest.java | 2 +-
18 files changed, 81 insertions(+), 62 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fa611f6ddf..fcbf850007 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,9 +27,9 @@
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Fixed `gremlin-go` to report a malformed or truncated GraphBinary response
as a deserialization error rather than a bare decoder message.
* Made `TinkerGraph` an interface and renamed the in-memory implementation to
`TinkerMemoryGraph`; `TinkerGraph.open()` and `gremlin.graph=...TinkerGraph`
behave as before. *(breaking)*
-* Renamed `TinkerTransactionGraph` to `TinkerStorageGraph`. *(breaking)*
-* Added a pluggable storage layer to `TinkerStorageGraph` that durably
persists each committed transaction to disk, selected with the
`gremlin.tinkergraph.storage` config key and shipping a GraphBinary engine,
with a `gremlin.tinkergraph.storage.sync` key to choose `commit` (fsync per
commit) or `os` durability; a storage location is locked to a single writer, so
opening one already in use fails fast; the append log auto-compacts once it
exceeds `gremlin.tinkergraph.storage.compactThresh [...]
-* Removed automatic persistence from `TinkerMemoryGraph`, which is now purely
in-memory and ignores `gremlin.tinkergraph.graphLocation`/`graphFormat`. Use
`TinkerStorageGraph` for durability or `g.io()` for interchange. *(breaking)*
+* Renamed `TinkerTransactionGraph` to `TinkerStorageGraph`.
+* Added a pluggable storage layer to `TinkerStorageGraph` that durably
persists each committed transaction to disk.
+* Removed automatic persistence from `TinkerMemoryGraph`, which is now purely
in-memory and ignores `gremlin.tinkergraph.graphLocation`/`graphFormat`. Use
`TinkerStorageGraph` for durability or `g.io()` for interchange.
[[release-4-0-0-beta-3]]
=== TinkerPop 4.0.0-beta.3 (July 20, 2026)
diff --git a/docs/src/reference/implementations-tinkergraph.asciidoc
b/docs/src/reference/implementations-tinkergraph.asciidoc
index 6b3a8d086c..f4828243e0 100644
--- a/docs/src/reference/implementations-tinkergraph.asciidoc
+++ b/docs/src/reference/implementations-tinkergraph.asciidoc
@@ -176,8 +176,8 @@ TinkerGraph has several settings that can be provided on
creation via `Configura
to disk. The value is either a built-in engine name (`graphbinary`) or a fully
qualified class name of a
`TinkerStorage` implementation. When not specified (default), the graph holds
data only in memory. This setting is
only valid on `TinkerStorageGraph` and is ignored by the in-memory
`TinkerMemoryGraph`.
-|gremlin.tinkergraph.graphLocation |The directory in which
`TinkerStorageGraph` stores its durable data. Required when
-`gremlin.tinkergraph.storage` is set and ignored otherwise.
+|gremlin.tinkergraph.storage.directory |The directory in which
`TinkerStorageGraph` stores its durable data. Required
+when `gremlin.tinkergraph.storage` is set and ignored otherwise.
|gremlin.tinkergraph.storage.sync |The durability applied to each committed
transaction by a `TinkerStorageGraph`
storage engine. `commit` (default) forces each commit to disk so an
acknowledged commit survives an operating system
crash or power loss. `os` only flushes to the operating system, so a commit
survives a crash of the JVM process but
@@ -419,7 +419,7 @@ When a storage engine is configured, the changeset of each
committed transaction
rebuilt from that data when it is opened again. The in-memory
`TinkerMemoryGraph` does not retain data across restarts.
A storage engine is selected with the `gremlin.tinkergraph.storage`
configuration key, and
-`gremlin.tinkergraph.graphLocation` names the directory that holds the durable
data. The value of the storage key is
+`gremlin.tinkergraph.storage.directory` names the directory that holds the
durable data. The value of the storage key is
either a built-in engine name or the fully qualified class name of a
`TinkerStorage` implementation, following the same
enum-name-or-class-name convention as the `IdManager` settings. The built-in
`graphbinary` engine records committed
transactions as an append-only log serialized with GraphBinary and folds that
log into a compact snapshot when the
@@ -430,7 +430,7 @@ graph is closed.
conf = new BaseConfiguration()
conf.setProperty("gremlin.graph",
"org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGraph")
conf.setProperty("gremlin.tinkergraph.storage", "graphbinary")
-conf.setProperty("gremlin.tinkergraph.graphLocation", "/data/mygraph")
+conf.setProperty("gremlin.tinkergraph.storage.directory", "/data/mygraph")
graph = TinkerStorageGraph.open(conf)
g = traversal().with(graph)
@@ -480,7 +480,7 @@ so its data is lost when the server stops.
----
gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGraph
gremlin.tinkergraph.storage=graphbinary
-gremlin.tinkergraph.graphLocation=/data/mygraph
+gremlin.tinkergraph.storage.directory=/data/mygraph
----
[source,yaml]
diff --git a/docs/src/upgrade/release-4.x.x.asciidoc
b/docs/src/upgrade/release-4.x.x.asciidoc
index 1097f9b075..4b5b82c93e 100644
--- a/docs/src/upgrade/release-4.x.x.asciidoc
+++ b/docs/src/upgrade/release-4.x.x.asciidoc
@@ -74,9 +74,9 @@ See:
link:https://lists.apache.org/thread/2zt62kvfssh6xz5vnf2lk1g7cstq9vod[DISCU
==== TinkerStorageGraph Pluggable Disk Storage
`TinkerStorageGraph` gained the optional disk storage anticipated by its
rename. A storage engine is selected with the
-new `gremlin.tinkergraph.storage` configuration key, and
`gremlin.tinkergraph.graphLocation` names the directory that
-holds the durable data. When a storage engine is configured, each committed
transaction is durably written to disk and
-the graph is rebuilt from that data when it is opened again, so a graph
survives a restart of the JVM.
+new `gremlin.tinkergraph.storage` configuration key, and
`gremlin.tinkergraph.storage.directory` names the directory
+that holds the durable data. When a storage engine is configured, each
committed transaction is durably written to
+disk and the graph is rebuilt from that data when it is opened again, so a
graph survives a restart of the JVM.
The reference engine, `graphbinary`, records committed transactions as an
append-only log serialized with GraphBinary
and folds that log into a compact snapshot on close. The storage layer is
pluggable: the value of the storage key may
@@ -87,7 +87,7 @@ also be the fully-qualified class name of a custom engine,
following the same co
conf = new BaseConfiguration()
conf.setProperty('gremlin.graph',
'org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGraph')
conf.setProperty('gremlin.tinkergraph.storage', 'graphbinary')
-conf.setProperty('gremlin.tinkergraph.graphLocation', '/data/mygraph')
+conf.setProperty('gremlin.tinkergraph.storage.directory', '/data/mygraph')
graph = TinkerStorageGraph.open(conf)
g = traversal().with(graph)
@@ -105,8 +105,11 @@ g.V().count().next()
The in-memory `TinkerMemoryGraph` no longer persists to disk. Earlier versions
of TinkerGraph would automatically read
from `gremlin.tinkergraph.graphLocation` on open and write back to it on
close, using the `gremlin.tinkergraph.graphFormat`
interchange format. That automatic behavior is removed, and
`TinkerMemoryGraph` now ignores both keys and reports
-`FEATURE_PERSISTENCE` as `false`. Durable persistence is the responsibility of
`TinkerStorageGraph` and its storage
-engine, while moving data in and out of any graph in an interchange format
remains the job of the `io()` step:
+`FEATURE_PERSISTENCE` as `false`. Note that
`gremlin.tinkergraph.graphLocation` named a *file* to be read and written
+in an interchange format, while the new
`gremlin.tinkergraph.storage.directory` names a *directory* managed by a
+storage engine. They are deliberately different keys because they mean
different things. Durable persistence is the
+responsibility of `TinkerStorageGraph` and its storage engine, while moving
data in and out of any graph in an
+interchange format remains the job of the `io()` step:
[source,groovy]
----
@@ -116,8 +119,10 @@ g.io('/tmp/graph.kryo').read().iterate()
----
Configurations that previously relied on the in-memory graph loading itself
from `graphLocation` on open must either
-call `io().read()` explicitly or switch to `TinkerStorageGraph` with a storage
engine. The `gremlin.tinkergraph.graphFormat`
-key is retired.
+call `io().read()` explicitly or switch to `TinkerStorageGraph` with a storage
engine. Both
+`gremlin.tinkergraph.graphLocation` and `gremlin.tinkergraph.graphFormat` are
retired as TinkerGraph settings; no graph
+implementation reads either one. They survive only in Gremlin Server's
`SimpleAuthenticator`, which uses them to read
+its credential store at startup.
See: <<tinkergraph-gremlin,TinkerGraph>>
diff --git a/gremlin-console/conf/tinkergraph-storage.properties
b/gremlin-console/conf/tinkergraph-storage.properties
index 2a04bb7d37..9ade10d3d9 100644
--- a/gremlin-console/conf/tinkergraph-storage.properties
+++ b/gremlin-console/conf/tinkergraph-storage.properties
@@ -16,10 +16,11 @@
# under the License.
# Sample configuration for a durable, transactional TinkerStorageGraph.
Opening a graph with this configuration
-# (for example via GraphFactory) produces a TinkerStorageGraph that persists
committed transactions to graphLocation.
+# (for example via GraphFactory) produces a TinkerStorageGraph that persists
committed transactions to the
+# configured storage directory.
gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGraph
# built-in storage engine; without this key the graph is transactional but
in-memory only
gremlin.tinkergraph.storage=graphbinary
# directory holding the durable data (created if absent; a location may be
opened by only one graph at a time)
-gremlin.tinkergraph.graphLocation=/tmp/tinkergraph
+gremlin.tinkergraph.storage.directory=/tmp/tinkergraph
diff --git a/gremlin-server/conf/tinkergraph-credentials.properties
b/gremlin-server/conf/tinkergraph-credentials.properties
index fb4225b376..a39ff4158f 100644
--- a/gremlin-server/conf/tinkergraph-credentials.properties
+++ b/gremlin-server/conf/tinkergraph-credentials.properties
@@ -17,7 +17,8 @@
gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
gremlin.tinkergraph.vertexIdManager=LONG
# This credential store is an in-memory TinkerGraph. TinkerGraph no longer
auto-loads from disk on open, so
-# SimpleAuthenticator reads the store explicitly from graphLocation using
graphFormat at startup. (A durable
-# TinkerStorageGraph, by contrast, manages its own persistence and needs no
graphFormat.)
+# SimpleAuthenticator reads the store explicitly from graphLocation using
graphFormat at startup. Both keys are
+# retired as TinkerGraph settings and are honoured only for this load; they
name an interchange FILE, not the
+# storage DIRECTORY that a durable TinkerStorageGraph configures with
gremlin.tinkergraph.storage.directory.
gremlin.tinkergraph.graphLocation=data/credentials.kryo
gremlin.tinkergraph.graphFormat=gryo
\ No newline at end of file
diff --git a/gremlin-server/conf/tinkerstoragegraph-persistent.properties
b/gremlin-server/conf/tinkerstoragegraph-persistent.properties
index dac2460298..4d1ad1de7c 100644
--- a/gremlin-server/conf/tinkerstoragegraph-persistent.properties
+++ b/gremlin-server/conf/tinkerstoragegraph-persistent.properties
@@ -25,7 +25,7 @@
gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerStorageGr
gremlin.tinkergraph.storage=graphbinary
# Directory holding the durable data. Required when a storage engine is set.
It is created if absent and may be
# opened by only one graph at a time (single writer, whether in this JVM or
another process).
-gremlin.tinkergraph.graphLocation=/tmp/tinkerstoragegraph
+gremlin.tinkergraph.storage.directory=/tmp/tinkerstoragegraph
gremlin.tinkergraph.vertexIdManager=LONG
gremlin.tinkergraph.edgeIdManager=LONG
diff --git
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
index 435316cd08..28c82e9398 100644
---
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
+++
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
@@ -95,14 +95,21 @@ public class SimpleAuthenticator implements Authenticator {
}
/**
- * Reads the credential store into the supplied in-memory {@link
TinkerGraph} from the {@code graphLocation}
- * declared in its configuration, if any. TinkerGraph no longer loads from
disk automatically on open, so the
- * credential file must be read explicitly here. A {@code
TinkerStorageGraph} configured with a durable storage
- * engine manages its own data and is skipped (it has no {@code
graphFormat}).
+ * Reads the credential store into the supplied in-memory {@link
TinkerGraph} from the
+ * {@code gremlin.tinkergraph.graphLocation} and {@code
gremlin.tinkergraph.graphFormat} entries of its
+ * configuration, if present. Earlier versions of TinkerGraph read those
keys themselves on open, so the
+ * credential store loaded as a side effect of {@code GraphFactory.open};
that automatic behaviour was removed
+ * and this method preserves it for the credential store alone.
+ * <p/>
+ * No TinkerGraph reads either key any more, which is why they are named
here as literals rather than through
+ * constants. Despite the {@code gremlin.tinkergraph} prefix they are in
effect settings of this authenticator,
+ * and belong in its own {@code config} block beside {@code credentialsDb}
rather than in the graph's properties
+ * file. They are left in place here only to keep existing credential
configurations working. A graph with a
+ * storage engine manages its own data and is skipped.
*/
private static void loadCredentialStore(final TinkerGraph graph) {
final Configuration conf = graph.configuration();
- final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
+ final String location =
conf.getString("gremlin.tinkergraph.graphLocation", null);
// a storage engine manages its own persistence and is not an
interchange-format load
final String storage =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE, null);
if (null == location || storage != null)
diff --git
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/AbstractTinkerGraph.java
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/AbstractTinkerGraph.java
index 17e359b94f..b75083f23a 100644
---
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/AbstractTinkerGraph.java
+++
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/AbstractTinkerGraph.java
@@ -78,7 +78,12 @@ public abstract class AbstractTinkerGraph implements
TinkerGraph {
protected TinkerServiceRegistry serviceRegistry;
protected Configuration configuration;
- protected String graphLocation;
+
+ /**
+ * The filesystem directory backing the storage engine, from {@code
gremlin.tinkergraph.storage.directory}, or
+ * {@code null} when the graph holds data only in memory.
+ */
+ protected String storageDirectory;
/**
* The pluggable durable storage engine, or {@code null} when the graph
holds data only in memory. Only set by
diff --git
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index f011cd5202..0f7c0088b7 100644
---
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -45,20 +45,20 @@ public interface TinkerGraph extends Graph {
String GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER =
"gremlin.tinkergraph.edgeIdManager";
String GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER =
"gremlin.tinkergraph.vertexPropertyIdManager";
String GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY =
"gremlin.tinkergraph.defaultVertexPropertyCardinality";
- /**
- * The filesystem directory that a {@link TinkerStorageGraph} uses for its
durable storage engine. Ignored by
- * {@link TinkerMemoryGraph}, which is purely in-memory. Only meaningful
when {@link #GREMLIN_TINKERGRAPH_STORAGE}
- * is also set.
- */
- String GREMLIN_TINKERGRAPH_GRAPH_LOCATION =
"gremlin.tinkergraph.graphLocation";
/**
* Selects the pluggable storage engine used by {@link TinkerStorageGraph}
to durably persist transactions to the
- * {@link #GREMLIN_TINKERGRAPH_GRAPH_LOCATION} directory. The value is
either a
+ * {@link #GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY} directory. The value is
either a
* {@code TinkerStorageGraph.DefaultStorage} enum name (e.g. {@code
graphbinary}) or the fully-qualified class name
* of a {@code
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.TinkerStorage}
implementation. When unset,
* the graph holds data only in memory. Not valid on {@link
TinkerMemoryGraph}.
*/
String GREMLIN_TINKERGRAPH_STORAGE = "gremlin.tinkergraph.storage";
+ /**
+ * The filesystem directory that a {@link TinkerStorageGraph} storage
engine uses for its durable data. Ignored by
+ * {@link TinkerMemoryGraph}, which is purely in-memory. Only meaningful
when {@link #GREMLIN_TINKERGRAPH_STORAGE}
+ * is also set.
+ */
+ String GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY =
"gremlin.tinkergraph.storage.directory";
/**
* The durability mode a {@link TinkerStorageGraph} storage engine applies
on commit. Either {@code commit}
* (default) to {@code fsync} every commit so acknowledged commits survive
an OS crash or power loss, or {@code os}
diff --git
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerStorageGraph.java
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerStorageGraph.java
index ae9fcb2b48..dc68a89ea5 100644
---
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerStorageGraph.java
+++
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerStorageGraph.java
@@ -55,7 +55,7 @@ import java.util.concurrent.ConcurrentHashMap;
* restarts.
* <p/>
* Persistence is pluggable through the {@link
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.TinkerStorage}
- * SPI and enabled with the {@code gremlin.tinkergraph.storage} and {@code
gremlin.tinkergraph.graphLocation}
+ * SPI and enabled with the {@code gremlin.tinkergraph.storage} and {@code
gremlin.tinkergraph.storage.directory}
* configuration keys. Each committed transaction is written through to the
storage engine before the in-memory commit
* is applied, and reopening the same location replays the persisted commits
to rebuild the graph. A storage location
* is single-writer: it is guarded by an exclusive {@link
org.apache.tinkerpop.gremlin.tinkergraph.structure.storage.DirectoryLock}
@@ -105,12 +105,12 @@ public final class TinkerStorageGraph extends
AbstractTinkerGraph {
defaultVertexLabel = Vertex.DEFAULT_LABEL;
defaultEdgeLabel = Edge.DEFAULT_LABEL;
- graphLocation =
configuration.getString(GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
+ storageDirectory =
configuration.getString(GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY, null);
storage = selectStorage(configuration, GREMLIN_TINKERGRAPH_STORAGE);
- if (storage != null && null == graphLocation)
+ if (storage != null && null == storageDirectory)
throw new IllegalStateException(String.format("The %s must be
specified when %s is set",
- GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
GREMLIN_TINKERGRAPH_STORAGE));
+ GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
GREMLIN_TINKERGRAPH_STORAGE));
serviceRegistry = new TinkerServiceRegistry(this);
configuration.getList(String.class, GREMLIN_TINKERGRAPH_SERVICE,
Collections.emptyList()).forEach(serviceClass ->
@@ -119,7 +119,7 @@ public final class TinkerStorageGraph extends
AbstractTinkerGraph {
if (storage != null) {
// take an exclusive lock on the storage directory before the
engine touches any files, so a second graph
// on the same location fails fast rather than corrupting it. The
directory must exist to hold the lock.
- final File dir = new File(graphLocation);
+ final File dir = new File(storageDirectory);
if (!dir.isDirectory() && !dir.mkdirs())
throw new IllegalStateException(String.format("Could not
create storage directory %s", dir));
directoryLock = DirectoryLock.acquire(dir);
diff --git
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractLogStorage.java
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractLogStorage.java
index 4c8eefeb08..b186471eda 100644
---
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractLogStorage.java
+++
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractLogStorage.java
@@ -142,10 +142,10 @@ public abstract class AbstractLogStorage implements
TinkerStorage {
@Override
public void open(final AbstractTinkerGraph graph, final Configuration
config) {
- final String location =
config.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
+ final String location =
config.getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY, null);
if (null == location)
throw new IllegalStateException(String.format("%s must be set to
use a durable storage engine",
- TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION));
+ TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY));
this.directory = new File(location);
this.snapshotFile = new File(directory, SNAPSHOT_FILE);
this.logFile = new File(directory, LOG_FILE);
diff --git
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/TinkerStorage.java
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/TinkerStorage.java
index ab4745dcf2..0d90879c8f 100644
---
a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/TinkerStorage.java
+++
b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/TinkerStorage.java
@@ -50,7 +50,7 @@ public interface TinkerStorage extends AutoCloseable {
* during graph construction before {@link #replay(AbstractTinkerGraph)}.
*
* @param graph the graph that owns this engine
- * @param config the graph configuration, including {@code
gremlin.tinkergraph.graphLocation}
+ * @param config the graph configuration, including {@code
gremlin.tinkergraph.storage.directory}
*/
void open(AbstractTinkerGraph graph, Configuration config);
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerStorageGraphProvider.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerStorageGraphProvider.java
index a0b686266f..d7f75e6344 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerStorageGraphProvider.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerStorageGraphProvider.java
@@ -71,7 +71,7 @@ public class TinkerStorageGraphProvider extends
AbstractGraphProvider {
put(TinkerStorageGraph.GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY,
VertexProperty.Cardinality.list.name());
if (requiresPersistence(test, testMethodName)) {
put(TinkerStorageGraph.GREMLIN_TINKERGRAPH_STORAGE,
"graphbinary");
- put(TinkerStorageGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
+ put(TinkerStorageGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
TestHelper.makeTestDataDirectory(test, "temp",
testMethodName));
}
}};
@@ -83,9 +83,9 @@ public class TinkerStorageGraphProvider extends
AbstractGraphProvider {
graph.close();
// in the event the graph is persisted we need to clean up the storage
directory
- final String graphLocation = null != configuration ?
configuration.getString(TinkerStorageGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
null) : null;
- if (graphLocation != null) {
- deleteRecursively(new File(graphLocation));
+ final String storageDirectory = null != configuration ?
configuration.getString(TinkerStorageGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
null) : null;
+ if (storageDirectory != null) {
+ deleteRecursively(new File(storageDirectory));
}
}
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractTinkerStorageConformanceTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractTinkerStorageConformanceTest.java
index 34afede360..254871a776 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractTinkerStorageConformanceTest.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/AbstractTinkerStorageConformanceTest.java
@@ -86,7 +86,7 @@ public abstract class AbstractTinkerStorageConformanceTest {
final Configuration conf = new BaseConfiguration();
conf.setProperty(Graph.GRAPH, TinkerStorageGraph.class.getName());
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE,
storageEngine());
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
location);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
location);
return conf;
}
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/DirectoryLockTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/DirectoryLockTest.java
index 6856dddbf2..02e2fc24c5 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/DirectoryLockTest.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/DirectoryLockTest.java
@@ -58,7 +58,7 @@ public class DirectoryLockTest {
final Configuration conf = new BaseConfiguration();
conf.setProperty(Graph.GRAPH, TinkerStorageGraph.class.getName());
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE,
"graphbinary");
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
location);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
location);
return conf;
}
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/GraphBinaryStorageTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/GraphBinaryStorageTest.java
index bcb8605ba2..346e6a50c4 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/GraphBinaryStorageTest.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/GraphBinaryStorageTest.java
@@ -64,7 +64,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
final TinkerStorageGraph graph = open();
graph.addVertex(T.id, 1);
graph.tx().commit();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
assertTrue(new File(location, GraphBinaryStorage.LOG_FILE).exists());
graph.close();
// close compacts, producing a snapshot and truncating the log
@@ -111,7 +111,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldLeaveNoTempSnapshotAfterCompaction() {
final TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
graph.addVertex(T.id, 1, "value", 1);
graph.tx().commit();
graph.compact();
@@ -124,7 +124,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldStreamSnapshotAsOneFramePerElement() throws Exception {
final TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
final Vertex a = graph.addVertex(T.id, 1, "name", "a");
final Vertex b = graph.addVertex(T.id, 2, "name", "b");
final Vertex c = graph.addVertex(T.id, 3, "name", "c");
@@ -157,7 +157,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
final int vertexCount = 500;
final int edgeCount = 499;
final TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
try {
for (int i = 0; i < vertexCount; i++)
graph.addVertex(T.id, i, "value", i);
@@ -231,7 +231,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
// a small threshold makes automatic compaction fire mid-run, without
any explicit compact()/close()
final Configuration conf = config();
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_COMPACT_THRESHOLD,
2048L);
- final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
TinkerStorageGraph graph = TinkerStorageGraph.open(conf);
try {
for (int i = 0; i < 200; i++) {
@@ -263,7 +263,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
public void shouldNotAutoCompactWhenThresholdIsZero() {
final Configuration conf = config();
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_COMPACT_THRESHOLD, 0L);
- final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
final TinkerStorageGraph graph = TinkerStorageGraph.open(conf);
try {
for (int i = 0; i < 50; i++) {
@@ -280,7 +280,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldRecoverFromTruncatedTrailingFrame() throws Exception {
TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
graph.addVertex(T.id, 1, "value", 1);
graph.tx().commit();
graph.addVertex(T.id, 2, "value", 2);
@@ -314,7 +314,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldFailOnCorruptFrameWithBadCrc() throws Exception {
TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
graph.addVertex(T.id, 1, "value", 1);
graph.tx().commit();
graph.addVertex(T.id, 2, "value", 2);
@@ -344,7 +344,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldFailOnForeignFileWithBadMagic() throws Exception {
TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
graph.addVertex(T.id, 1);
graph.tx().commit();
graph.tx().close();
@@ -369,7 +369,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
@Test
public void shouldFailOnStoreWithUnsupportedVersionMarker() throws
Exception {
TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
graph.addVertex(T.id, 1);
graph.tx().commit();
graph.close();
@@ -441,7 +441,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
// frames. Reopening from a log with no snapshot must rebuild the
dictionary incrementally and resolve all refs.
final Configuration conf = config();
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_COMPACT_THRESHOLD,
0L); // keep the log, no auto-compaction
- final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
conf.getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
TinkerStorageGraph graph = TinkerStorageGraph.open(conf);
for (int i = 0; i < 10; i++) {
graph.addVertex(T.id, i, "key" + i, i);
@@ -491,7 +491,7 @@ public class GraphBinaryStorageTest extends
AbstractTinkerStorageConformanceTest
// whole-object format cost for a comparable graph (3 vertex props, 2
edge props, E=V).
final int vertexCount = 200;
final TinkerStorageGraph graph = open();
- final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION);
+ final String location =
graph.configuration().getString(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY);
try {
for (int i = 0; i < vertexCount; i++)
graph.addVertex(T.id, i, "name", "v" + i, "age", i % 100,
"score", i * 1.5d);
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCommitSerializationTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCommitSerializationTest.java
index 2a0d5dd174..1749b0ea7e 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCommitSerializationTest.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCommitSerializationTest.java
@@ -65,7 +65,7 @@ public class StorageCommitSerializationTest {
final Configuration conf = new BaseConfiguration();
conf.setProperty(Graph.GRAPH, TinkerStorageGraph.class.getName());
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE,
ConcurrencyProbeStorage.class.getName());
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
location);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
location);
return TinkerStorageGraph.open(conf);
}
diff --git
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCrashConsistencyTest.java
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCrashConsistencyTest.java
index 4bbb3854ce..815fb5bbb3 100644
---
a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCrashConsistencyTest.java
+++
b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/storage/StorageCrashConsistencyTest.java
@@ -66,7 +66,7 @@ public class StorageCrashConsistencyTest {
final Configuration conf = new BaseConfiguration();
conf.setProperty(Graph.GRAPH, TinkerStorageGraph.class.getName());
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE,
"graphbinary");
- conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION,
location);
+ conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_DIRECTORY,
location);
// disable auto-compaction so tests control exactly when compaction
happens
conf.setProperty(TinkerGraph.GREMLIN_TINKERGRAPH_STORAGE_COMPACT_THRESHOLD, 0L);
return conf;