Changes
authorAli Younis <ayounis@uci.edu>
Tue, 16 May 2017 02:00:08 +0000 (19:00 -0700)
committerAli Younis <ayounis@uci.edu>
Tue, 16 May 2017 02:00:08 +0000 (19:00 -0700)
version2/src/java/iotcloud/Table.java
version2/src/java/iotcloud/Test.java
version2/src/java/light_fan_embed_benchmark/LightsController.java

index 59a12f4207a2858b580dd1d277c25419e631fc11..735d15021228c29019f5606ae43d8a49240304f1 100644 (file)
@@ -1443,6 +1443,7 @@ final public class Table {
                // Process each slots data
                for (Slot slot : newSlots) {
                        processSlot(indexer, slot, acceptUpdatesToLocal, machineSet);
+
                        updateExpectedSize();
                }
 
@@ -1516,16 +1517,25 @@ final public class Table {
        }
 
        private void initExpectedSize(long firstSequenceNumber, long numberOfSlots) {
+               // if (didFindTableStatus) {
+               // return;
+               // }
+               long prevslots = firstSequenceNumber;
+
+
                if (didFindTableStatus) {
-                       return;
+                       expectedsize = (prevslots < ((long) numberOfSlots)) ? (int) prevslots : expectedsize;
+               } else {
+                       expectedsize = (prevslots < ((long) numberOfSlots)) ? (int) prevslots : numberOfSlots;
                }
-               long prevslots = firstSequenceNumber;
-               expectedsize = (prevslots < ((long) numberOfSlots)) ? (int) prevslots : numberOfSlots;
+               
+               didFindTableStatus = true;
                currMaxSize = numberOfSlots;
        }
 
        private void updateExpectedSize() {
                expectedsize++;
+
                if (expectedsize > currMaxSize) {
                        expectedsize = currMaxSize;
                }
index 158dd725d57ff4c6ea4d8385cb047aa0f363504b..403c2beb368b4645ffa3b8418fab02820ce22996 100644 (file)
@@ -303,7 +303,7 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, 6000);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
 
         System.out.println("Init Table t1s");
 
@@ -316,7 +316,7 @@ public class Test {
 
 
         System.out.println("Update Table t2");
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, 6001);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
         while (t2.update() == false) {}
 
         // Make the Keys
@@ -527,7 +527,7 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, 6000);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
         System.out.println("Init Table t1s");
         while (true) {
             try {
@@ -535,7 +535,7 @@ public class Test {
                 break;
             } catch (Exception e) { }
         }
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, 6001);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
         while (t2.update() == false) {}
 
         t1.addLocalCommunication(351, "127.0.0.1", 6001);
@@ -760,7 +760,7 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, 6000);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
 
         System.out.println("Init Table t1s");
         while (true) {
@@ -772,7 +772,7 @@ public class Test {
 
 
         System.out.println("Update Table t2");
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, 6001);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
         while (t2.update() == false) {}
 
         t1.addLocalCommunication(351, "127.0.0.1", 6001);
@@ -916,7 +916,7 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, 6000);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, 6000);
 
         System.out.println("Init Table t1s");
 
@@ -929,7 +929,7 @@ public class Test {
 
 
         System.out.println("Update Table t2");
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, 6001);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, 6001);
         while (t2.update() == false) {}
 
         t1.addLocalCommunication(351, "127.0.0.1", 6001);
@@ -1177,9 +1177,9 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, -1);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, -1);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
         t2.update();
 
         // Make the Keys
@@ -1393,9 +1393,9 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, -1);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, -1);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
         t2.update();
 
         // Make the Keys
@@ -1554,9 +1554,9 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, -1);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, -1);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
         t2.update();
 
 
@@ -1771,9 +1771,9 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, -1);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, -1);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
         t2.update();
 
         // Make the Keys
@@ -1946,9 +1946,9 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
-        Table t1 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 321, -1);
+        Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
-        Table t2 = new Table("http://127.0.0.1/test.iotcloud/", "reallysecret", 351, -1);
+        Table t2 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 351, -1);
         t2.update();
 
 
index 2fb3d1d27d87e513839d80ee5b6905755885731a..f810cf58fee61f9ca4994f2e03795a5ca3201507 100644 (file)
@@ -93,6 +93,7 @@ class LightsController {
 
             try {
 
+                System.out.println("Loop");
 
                 String pingTimer = Long.toString(System.currentTimeMillis());
                 IoTString ipingTimer = new IoTString(pingTimer);
@@ -115,6 +116,8 @@ class LightsController {
                     }
                 }
 
+                
+
             } catch (Error e) {
 
                 e.printStackTrace();