public Iterable<KeyValuePair> getKeyValuePairsForVertex(AccumuloVertex vertex) { List<KeyValuePair> results = new ArrayList<>(); Text vertexRowKey = new Text(vertex.getId()); results.add(new KeyValuePair(new Key(vertexRowKey, AccumuloVertex.CF_SIGNAL, ElementMutationBuilder.EMPTY_TEXT, visibilityToAccumuloVisibility(vertex.getVisibility()), vertex.getTimestamp()), EMPTY_VALUE)); if (vertex.getPropertyDeleteMutations().iterator().hasNext()) { throw new VertexiumException("Cannot get key/value pairs for property deletions"); } for (PropertySoftDeleteMutation propertySoftDeleteMutation : vertex.getPropertySoftDeleteMutations()) { addPropertySoftDeleteToKeyValuePairs(results, vertexRowKey, propertySoftDeleteMutation); } for (Property property : vertex.getProperties()) { addPropertyToKeyValuePairs(results, vertexRowKey, property); } return results; }
public Iterable<KeyValuePair> getKeyValuePairsForVertex(AccumuloVertex vertex) { List<KeyValuePair> results = new ArrayList<>(); Text vertexRowKey = new Text(vertex.getId()); results.add(new KeyValuePair(new Key(vertexRowKey, AccumuloVertex.CF_SIGNAL, ElementMutationBuilder.EMPTY_TEXT, visibilityToAccumuloVisibility(vertex.getVisibility()), vertex.getTimestamp()), EMPTY_VALUE)); if (vertex.getPropertyDeleteMutations().iterator().hasNext()) { throw new VertexiumException("Cannot get key/value pairs for property deletions"); } for (PropertySoftDeleteMutation propertySoftDeleteMutation : vertex.getPropertySoftDeleteMutations()) { addPropertySoftDeleteToKeyValuePairs(results, vertexRowKey, propertySoftDeleteMutation); } for (Property property : vertex.getProperties()) { addPropertyToKeyValuePairs(results, vertexRowKey, property); } return results; }