package com.github.drulm.Spark_Knapsack

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;

public class knapsackApprox {
    SparkConf conf = new SparkConf().setAppName("Knapsack Approx").setMaster("local");
    JavaSparkContext sc = new JavaSparkContext(conf);


}

@@ -34,16 +34,41 @@
 apsack%0A%0A
+import org.apache.spark;%0A
 import o
@@ -94,16 +94,16 @@
 rkConf;%0A
-
 import o
@@ -234,16 +234,17 @@
 ntext;%0A%0A
+%0A
 public c
@@ -260,17 +260,93 @@
 sack
-Approx %7B%0A
+ %7B%0A    public static DataFrame knapsackApprox(DataFrame knapsackDF, double W) %7B%0A%0A    
     
@@ -428,16 +428,20 @@
 ocal%22);%0A
+    
     Java
@@ -487,11 +487,18 @@
 conf);%0A%0A
+    %7D%0A%0A
 %0A%7D%0A

Add function for knapsack Approx in Java