Sho SHIMIZU
Committed by Brian O'Connor

Remove comments that won't get meaningful during refactoring

Change-Id: Ia826e01b48821d167bb5f690b768e8305798a2fd
...@@ -496,9 +496,6 @@ public class IntentManager ...@@ -496,9 +496,6 @@ public class IntentManager
496 @Override 496 @Override
497 public Optional<IntentUpdate> execute() { 497 public Optional<IntentUpdate> execute() {
498 try { 498 try {
499 - // Compile the intent into installable derivatives.
500 - // If all went well, associate the resulting list of installable
501 - // intents with the top-level intent and proceed to install.
502 return Optional.of(new Installing(intent, compileIntent(intent, null))); 499 return Optional.of(new Installing(intent, compileIntent(intent, null)));
503 } catch (PathNotFoundException e) { 500 } catch (PathNotFoundException e) {
504 log.debug("Path not found for intent {}", intent); 501 log.debug("Path not found for intent {}", intent);
...@@ -613,8 +610,6 @@ public class IntentManager ...@@ -613,8 +610,6 @@ public class IntentManager
613 610
614 @Override 611 @Override
615 public void batchFailed() { 612 public void batchFailed() {
616 - // the current batch has failed, so recompile
617 - // remove the current batch and all remaining
618 for (int i = batches.size() - 1; i >= currentBatch; i--) { 613 for (int i = batches.size() - 1; i >= currentBatch; i--) {
619 batches.remove(i); 614 batches.remove(i);
620 } 615 }
...@@ -663,8 +658,6 @@ public class IntentManager ...@@ -663,8 +658,6 @@ public class IntentManager
663 658
664 @Override 659 @Override
665 public void batchFailed() { 660 public void batchFailed() {
666 - // the current batch has failed, so recompile
667 - // remove the current batch and all remaining
668 for (int i = batches.size() - 1; i >= currentBatch; i--) { 661 for (int i = batches.size() - 1; i >= currentBatch; i--) {
669 batches.remove(i); 662 batches.remove(i);
670 } 663 }
...@@ -708,8 +701,6 @@ public class IntentManager ...@@ -708,8 +701,6 @@ public class IntentManager
708 701
709 @Override 702 @Override
710 public void batchFailed() { 703 public void batchFailed() {
711 - // the current batch has failed, so recompile
712 - // remove the current batch and all remaining
713 for (int i = batches.size() - 1; i >= currentBatch; i--) { 704 for (int i = batches.size() - 1; i >= currentBatch; i--) {
714 batches.remove(i); 705 batches.remove(i);
715 } 706 }
...@@ -748,14 +739,6 @@ public class IntentManager ...@@ -748,14 +739,6 @@ public class IntentManager
748 @Override 739 @Override
749 public void run() { 740 public void run() {
750 try { 741 try {
751 - // this should only be called on the first iteration
752 - // note: this a "expensive", so it is not done in the constructor
753 -
754 - // - creates per Intent installation context (IntentUpdate)
755 - // - write Intents to store
756 - // - process (compile, install, etc.) each Intents
757 - // - generate FlowRuleBatch for this phase
758 - // build IntentUpdates
759 List<IntentUpdate> updates = createIntentUpdates(); 742 List<IntentUpdate> updates = createIntentUpdates();
760 743
761 // Write batch information 744 // Write batch information
...@@ -768,7 +751,6 @@ public class IntentManager ...@@ -768,7 +751,6 @@ public class IntentManager
768 // FIXME incomplete Intents should be cleaned up 751 // FIXME incomplete Intents should be cleaned up
769 // (transition to FAILED, etc.) 752 // (transition to FAILED, etc.)
770 753
771 - // TODO: remove duplicate due to inlining
772 // the batch has failed 754 // the batch has failed
773 // TODO: maybe we should do more? 755 // TODO: maybe we should do more?
774 log.error("Walk the plank, matey..."); 756 log.error("Walk the plank, matey...");
...@@ -892,14 +874,6 @@ public class IntentManager ...@@ -892,14 +874,6 @@ public class IntentManager
892 @Override 874 @Override
893 public void run() { 875 public void run() {
894 try { 876 try {
895 - // - peek if current FlowRuleBatch is complete
896 - // -- If complete OK:
897 - // step each IntentUpdate forward
898 - // If phase left: generate next FlowRuleBatch
899 - // If no more phase: write parking states
900 - // -- If complete FAIL:
901 - // Intent which failed: transition Intent to FAILED
902 - // Other Intents: resubmit same FlowRuleBatch for this phase
903 Future<CompletedBatchOperation> future = processFutures(); 877 Future<CompletedBatchOperation> future = processFutures();
904 if (future == null) { 878 if (future == null) {
905 // there are no outstanding batches; we are done 879 // there are no outstanding batches; we are done
...@@ -978,15 +952,11 @@ public class IntentManager ...@@ -978,15 +952,11 @@ public class IntentManager
978 } else if (attempts > MAX_ATTEMPTS) { 952 } else if (attempts > MAX_ATTEMPTS) {
979 abandonShip(); 953 abandonShip();
980 return; 954 return;
981 - } // else just resubmit the work 955 + }
982 Future<CompletedBatchOperation> future = applyNextBatch(intentUpdates); 956 Future<CompletedBatchOperation> future = applyNextBatch(intentUpdates);
983 executor.submit(new IntentBatchProcessFutures(ops, intentUpdates, timeLimit, attempts, future)); 957 executor.submit(new IntentBatchProcessFutures(ops, intentUpdates, timeLimit, attempts, future));
984 } else { 958 } else {
985 log.error("Cancelling FlowRuleBatch failed."); 959 log.error("Cancelling FlowRuleBatch failed.");
986 - // FIXME
987 - // cancel failed... batch is broken; shouldn't happen!
988 - // we could manually reverse everything
989 - // ... or just core dump and send email to Ali
990 abandonShip(); 960 abandonShip();
991 } 961 }
992 } 962 }
......