MartinHaeusler / chronos

The Chronos versioning project aims to provide easy-to-use and reliable versioned data storage.
52 stars 7 forks source link

Issues in chunkDbGraph() and writeDump() #1

Closed riyamalin closed 7 years ago

riyamalin commented 7 years ago

1)Getting below exception, when chunkDbGraph is used. Snippets below:

File file = new File("D:/Vel/ESSE/Work/eWorks/GrapDB/DB/TestTUPL.txt"); ChronoGraph graph = ChronoGraph.FACTORY.create().chunkDbGraph(file).build(); graph.tx().open();

Exception: Exception in thread "main" java.lang.IllegalArgumentException: The given string is no valid Chronos Version: '0.5.4'! at org.chronos.common.version.ChronosVersion.parse(ChronosVersion.java:28) at org.chronos.common.version.ChronosVersion.getCurrentVersion(ChronosVersion.java:50) at org.chronos.chronodb.internal.impl.engines.chunkdb.ChunkedChronoDB.updateBuildVersionInDatabase(ChunkedChronoDB.java:120) at org.chronos.chronodb.internal.impl.engines.base.AbstractChronoDB.postConstruct(AbstractChronoDB.java:73) at org.chronos.chronodb.internal.impl.builder.database.ChronoDBFactoryImpl.create(ChronoDBFactoryImpl.java:48) at org.chronos.chronodb.internal.impl.builder.database.AbstractChronoDBFinalizableBuilder.build(AbstractChronoDBFinalizableBuilder.java:62) at org.chronos.chronograph.internal.impl.builder.graph.AbstractChronoGraphFinalizableBuilder.build(AbstractChronoGraphFinalizableBuilder.java:61)

2). The below exception occurred when tried to create dump. snippet below:

// create the dump file File dumpFile = new File("D:/Vel/ESSE/Work/eWorks/GrapDB/DB/Test.chronodump");

// write the dump graph.writeDump(dumpFile);

ERROR 2017-03-22 09:00:50,940 [main] org.chronos.chronodb.internal.impl.dump.ChronoDBDumpUtil: Failed to write Chronos DB Dump! java.lang.IllegalArgumentException: The given string is no valid Chronos Version: '0.5.4'!

MartinHaeusler commented 7 years ago

Hi, thanks for reporting this issue. It will be fixed in the next upcoming release (expect it within the upcoming 2-3 weeks). The underlying issue is the following:

I will update the chronos version parser for the next release such that "X.Y.Z" (without trailing "-RELEASE") is recognized as a release version, then this issue should be gone.

riyamalin commented 7 years ago

Thanks Martin.

Will your next release supports, SQL integration as well?

MartinHaeusler commented 7 years ago

Hi,

I'm not entirely sure what kind of SQL support you expect, i.e. at which level of Chronos. For example, querying the graph data managed by ChronoGraph would be rather pointless (the two concepts just don't mix well). If you absolutely need to run SQL-like queries against a Graph Database, then OrientDB might fit your bill. However, they don't have versioning capabilities like Chronos does.

If you mean that you would like to run an SQL query against ChronoDB, then that's another story. You see, ChronoDB is just a data store. It can store any kinds of values - including table rows. ChronoGraph just showcases one way to utilize ChronoDB, by building a graph layer on top of it. In theory, it would be possible to build an SQL-based layer on top of ChronoDB. However, in practice, this would be a lot of work, and at the moment it's very unlikely that this will happen, at least not written by me.

If you want "something like SQL", then try adding secondary indices to a ChronoDB instance. For example, the IndexingTest (in particular the last test case) shows how this is done. With secondary indices, you can run queries against ChronoDB, like this:

db.tx().find().inDefaultKeyspace().where("name").containsIgnoreCase("foo").and().where("name").endsWith("bar").count()

... but the prerequisite is that you create a secondary index on "name" and provide a custom index value extractor for your data (to ChronoDB, all stored objects are "black boxes"). See the JavaDoc of IndexManager#addIndexer.

MartinHaeusler commented 7 years ago

Hello, I just pushed the new version (0.5.7) to Maven Central. This version treats "0.5.7" in the same way as "0.5.7-RELEASE". Therefore, the issue you mentioned should be fixed :)

Thanks again for reporting. I'm closing this issue for now. If it turns out that the issue still exists after updating to 0.5.7, please add a comment and let me know about it.