New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FederatedStore FederatedGraphStorage has Accumulo specific code #2495
Comments
For reference: Lines 612 to 638 in 23c323e
|
@d21211122 said: "I'm not sure what the solution should be, but I remember going through this problem and we definitely need a solution, and there shouldn't be Accumulo specific code in any of the federated code" |
I came across this problem when adding Kerberos support to the Accumulo Store. This Federated Store Accumulo connection needed to be changed so it would not rely on username/password authentication. This was done easily enough by making the Accumulo The solution for removing this Accumulo code from the Federated Store seems to me to be adding an ability to rename graphs stored in Accumulo into the Accumulo Store //Update Tables
String storeClass = graphToMove.getStoreProperties().getStoreClass();
if (nonNull(storeClass) && storeClass.startsWith(AccumuloStore.class.getPackage().getName())) {
AccumuloProperties tmpAccumuloProps = (AccumuloProperties) graphToMove.getStoreProperties();
TableUtils.renameTable(tmpAccumuloProps, graphId, newGraphId)
}
|
@GCHQDeveloper314 That would remove the direct Accumulo library usage, but there is still Accumulo store specific code. I think a more generic fix could be to implement a rename graph operation |
The way forward does look to be to add a proper way to rename graphs, but this seems to be a little more complex than it appears. Lines 201 to 205 in 2c1ac34
The @GCHQDev404 Could you explain why/when the |
One example is Users wishing to switch in graphs, but require operations with graphIds to continue to work. |
I haven't written a ticket for this yet, but a likely solution is to have Mapping of "TableNames to GraphIds" which FederatedStore can internally update a graph name This creates a small headache for Accumulo Admins which have tables with no names |
Possible solution is similar to the solution and approach at FederatedStore RemoveGraphDeleteAccumuloTableHandler #2632 |
The idea for mapping static Accumulo table names to renamable GraphIds is how this should have been done originally. However making this change now would be disruptive and would require migration for any existing Accumulo backed graphs. There are also certain undocumented practices which could stop working if this were adopted. In particular if table name is mapped to a unique graphId, what should happen to this mapping if the graph is removed. Or if the table no longer exists when should the mapping be cleaned up. Changing graphId is something which should be handled in the core As stated above, this further work can be raised as a new issue. |
* Add new test for ChangeGraphIdHandler This demonstrates the problem changing graph id when accumulo namespaces are used * Relocate and fix Accumulo table rename functionality Moved from federatedstore to accumulostore and fixed to work with namespaces * Add Unit Tests for new rename TableUtils method Also tidy up duplication in test class * Replace JUnit assertions with AssertJ
The Accumulo specific code in FederatedGraphStorage fixes mismatch in tables and graph name.
Possible Likely solution. There should be a mapping of GraphIds to TableID names so map can be updated without needing to rename tables.
link: gh-2435
The text was updated successfully, but these errors were encountered: