From eed1557a8f83c1d6422dfc5a80a1810cfb136d8f Mon Sep 17 00:00:00 2001 From: Yasin Uygun Date: Wed, 17 Jul 2019 08:12:43 +0300 Subject: [PATCH] Update Main.java --- src/main/java/com/trendyol/recomengine/ml/Main.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/trendyol/recomengine/ml/Main.java b/src/main/java/com/trendyol/recomengine/ml/Main.java index 04d7391..d038de6 100644 --- a/src/main/java/com/trendyol/recomengine/ml/Main.java +++ b/src/main/java/com/trendyol/recomengine/ml/Main.java @@ -21,15 +21,13 @@ public class Main { public static void main(String[] args) { - String reviewPath = null; - String modelPath = null; - if (args.length == 2) { - reviewPath = args[0]; - modelPath = args[1]; - } else { + if (args.length != 2) { System.out.println("Expected arguments: "); System.exit(0); } + + String reviewPath = args[0]; + String modelPath = args[1]; SparkSession spark = SparkSession .builder() @@ -152,4 +150,4 @@ public long getTimestamp() { return timestamp; } } -} \ No newline at end of file +}