Skip to content

Commit

Permalink
remove some constants
Browse files Browse the repository at this point in the history
  • Loading branch information
paynie committed Dec 6, 2019
1 parent d0e32fc commit b492a5c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,7 @@ object LINEExample2 {
case "tab" => "\t"
}

var edges:DataFrame = null
if (input.trim.startsWith("tdw://")) {
edges = GraphIO.load(input, isWeighted = isWeight,
srcIndex = srcIndex, dstIndex = dstIndex,
weightIndex = weightIndex, sep = sep)
} else {
edges = load(input, isWeight, sep)
}
var edges:DataFrame = load(input, isWeight, sep)

val numCores = SparkUtils.getNumCores(conf)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class LINEModel(dataset: Dataset[_], embeddingDim: Int, negativeNum: Int, stepSi
// Original edges
var edges:RDD[(String, String)] = null
if(dataset.schema.fields(0).dataType == LongType && dataset.schema.fields(1).dataType == LongType) {
// Load from tdw table
edges = dataset.select(srcNodeIdCol, dstNodeIdCol).rdd
.map(row => (row.getLong(0).toString, row.getLong(1).toString))
.filter(f => f._1 != f._2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ package object util {

val MAX_INT_STR = Int.MaxValue.toString

val TDW_PREFIX = "tdw://"
val HDFS_PREFIX = "hdfs://"

val SPLIT_SEPARATOR = "\\s+|,"
Expand All @@ -34,7 +33,6 @@ package object util {
object StorageType {
val LOCAL = "LOCAL"
val HDFS = "HDFS"
val TDW = "TDW"
}

object DataFormat {
Expand Down

0 comments on commit b492a5c

Please sign in to comment.