From f30cfd3335fc7dd00719bac19e0b14e4c8cddcaf Mon Sep 17 00:00:00 2001 From: Derrick Oswald Date: Thu, 18 Aug 2016 17:32:32 +0200 Subject: [PATCH] truncate clazz --- src/main/R/sample_Jahn_optimized.R | 2 +- src/main/scala/ch/ninecode/cim/CIMEdges.scala | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/R/sample_Jahn_optimized.R b/src/main/R/sample_Jahn_optimized.R index a33efd40d..d688cc807 100644 --- a/src/main/R/sample_Jahn_optimized.R +++ b/src/main/R/sample_Jahn_optimized.R @@ -22,7 +22,7 @@ sqlContext = sparkRSQL.init (sc) # hdfs://root@ec2-52-30-238-126.eu-west-1.compute.amazonaws.com:9000/data/dump_ews.xml # hdfs:/user/root/dump_ews.xml # hdfs:/data/NIS_CIM_Export_NS_INITIAL_FILL.rdf -elements = sql (sqlContext, "create temporary table elements using ch.ninecode.cim options (path 'hdfs:/data/NIS_CIM_Export_NS_INITIAL_FILL.rdf')") +elements = sql (sqlContext, "create temporary table elements using ch.ninecode.cim options (path 'hdfs:/data/20160817-12_NIS_CIM_Export_b4_Brügg.rdf')") head (sql (sqlContext, "select * from elements")) edges = sql (sqlContext, "select * from edges") redges = SparkR::collect (edges, stringsAsFactors=FALSE) # redges = SparkR::as.data.frame (edges) diff --git a/src/main/scala/ch/ninecode/cim/CIMEdges.scala b/src/main/scala/ch/ninecode/cim/CIMEdges.scala index 75bc12cd0..e548d31f1 100644 --- a/src/main/scala/ch/ninecode/cim/CIMEdges.scala +++ b/src/main/scala/ch/ninecode/cim/CIMEdges.scala @@ -66,6 +66,7 @@ class CIMEdges (val sqlContext: SQLContext) extends Serializable val bucket = Bucket () bucket.clazz = e.getClass ().getName () + bucket.clazz = bucket.clazz.substring (bucket.clazz.lastIndexOf (".") + 1) def do_identified (identified: IdentifiedObject) { bucket.name = identified.name