Commit b3d8e037 by TJBChris
parents ec8177bb 3ba61b9e
...@@ -601,7 +601,7 @@ public class GraphBackedMetadataRepository implements MetadataRepository { ...@@ -601,7 +601,7 @@ public class GraphBackedMetadataRepository implements MetadataRepository {
LOG.debug("Mapping instance {} to vertex {} for name {}", LOG.debug("Mapping instance {} to vertex {} for name {}",
typedInstance.getTypeName(), instanceVertex, attributeInfo.name); typedInstance.getTypeName(), instanceVertex, attributeInfo.name);
List list = (List) typedInstance.get(attributeInfo.name); List list = (List) typedInstance.get(attributeInfo.name);
if (list == null) { if (list == null || list.isEmpty()) {
return; return;
} }
...@@ -633,7 +633,7 @@ public class GraphBackedMetadataRepository implements MetadataRepository { ...@@ -633,7 +633,7 @@ public class GraphBackedMetadataRepository implements MetadataRepository {
typedInstance.getTypeName(), instanceVertex, attributeInfo.name); typedInstance.getTypeName(), instanceVertex, attributeInfo.name);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<Object, Object> collection = (Map<Object, Object>) typedInstance.get(attributeInfo.name); Map<Object, Object> collection = (Map<Object, Object>) typedInstance.get(attributeInfo.name);
if (collection == null) { if (collection == null || collection.isEmpty()) {
return; return;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.apache.hadoop.metadata.services; package org.apache.hadoop.metadata.repository.graph;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.thinkaurelius.titan.core.TitanGraph; import com.thinkaurelius.titan.core.TitanGraph;
...@@ -27,9 +27,6 @@ import org.apache.hadoop.metadata.ITypedReferenceableInstance; ...@@ -27,9 +27,6 @@ import org.apache.hadoop.metadata.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.MetadataException; import org.apache.hadoop.metadata.MetadataException;
import org.apache.hadoop.metadata.Referenceable; import org.apache.hadoop.metadata.Referenceable;
import org.apache.hadoop.metadata.RepositoryMetadataModule; import org.apache.hadoop.metadata.RepositoryMetadataModule;
import org.apache.hadoop.metadata.repository.graph.GraphBackedMetadataRepository;
import org.apache.hadoop.metadata.repository.graph.GraphHelper;
import org.apache.hadoop.metadata.repository.graph.TitanGraphService;
import org.apache.hadoop.metadata.types.AttributeDefinition; import org.apache.hadoop.metadata.types.AttributeDefinition;
import org.apache.hadoop.metadata.types.ClassType; import org.apache.hadoop.metadata.types.ClassType;
import org.apache.hadoop.metadata.types.DataTypes; import org.apache.hadoop.metadata.types.DataTypes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment