Changes
authorAli Younis <ayounis@uci.edu>
Thu, 18 May 2017 20:02:08 +0000 (13:02 -0700)
committerAli Younis <ayounis@uci.edu>
Thu, 18 May 2017 20:02:08 +0000 (13:02 -0700)
version2/src/java/light_fan_embed_benchmark/Filler.java
version2/src/java/light_fan_embed_benchmark/Filler2.java [new file with mode: 0644]
version2/src/java/light_fan_embed_benchmark/LightsController.java
version2/src/java/light_fan_embed_benchmark/runFiller2.bash [new file with mode: 0755]

index e629039e18cbceb1e311458076dab1edae26f750..82871f573918db1e3baa0787ebfa1c64204ae4f9 100644 (file)
@@ -1,5 +1,12 @@
 
 
+
+import java.util.Scanner;
+import iotcloud.*;
+
+import java.util.Scanner;
+import iotcloud.*;
+
 import java.util.Scanner;
 import iotcloud.*;
 class Filler {
diff --git a/version2/src/java/light_fan_embed_benchmark/Filler2.java b/version2/src/java/light_fan_embed_benchmark/Filler2.java
new file mode 100644 (file)
index 0000000..0e84979
--- /dev/null
@@ -0,0 +1,44 @@
+
+
+
+import java.util.Scanner;
+import iotcloud.*;
+
+import java.util.Scanner;
+import iotcloud.*;
+class Filler2 {
+    public static void main(String[] args) throws Exception {
+
+
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 400, -1);
+        t1.rebuild(); // update
+
+        String valueA = "on";
+        String valueB = "off";
+        IoTString iValueA = new IoTString(valueA);
+        IoTString iValueB = new IoTString(valueB);
+
+
+        System.out.println("Starting System");
+        String a1 = "bulb1";
+        IoTString ia1 = new IoTString(a1);
+
+
+        while (true) {
+
+
+
+            // t1.update();
+            t1.startTransaction();
+            t1.addKV(ia1, iValueB);
+            t1.commitTransaction();
+
+            try {
+                Thread.sleep(500);
+            } catch (Exception e) {
+
+            }
+
+        }
+    }
+}
\ No newline at end of file
index 69eed6f0db7e2645a8aed25afafafc67a883f648..46df781187376e224e522ab6ef8bdce863c6cb3a 100644 (file)
@@ -117,6 +117,9 @@ class LightsController {
 
 
 
+        // Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 400, -1);
+        // t2.rebuild();
+
 
         while (true) {
 
@@ -127,11 +130,16 @@ class LightsController {
                 String pingTimer = Long.toString(System.currentTimeMillis());
                 IoTString ipingTimer = new IoTString(pingTimer);
 
-                t1.update();
+                // t1.update();
                 t1.startTransaction();
                 t1.addKV(ipingTimerKey, ipingTimer);
                 t1.commitTransaction();
 
+                // // t2.update();
+                // t2.startTransaction();
+                // t2.addKV(ipingTimerKey, ipingTimer);
+                // t2.commitTransaction();
+
 
 
 
diff --git a/version2/src/java/light_fan_embed_benchmark/runFiller2.bash b/version2/src/java/light_fan_embed_benchmark/runFiller2.bash
new file mode 100755 (executable)
index 0000000..7a37caf
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+java -cp .:../iotcloud/bin Filler2
\ No newline at end of file