Mercurial > hg > Database > Alice
changeset 185:094d8fa4945e working
add comment
author | e095732 |
---|---|
date | Wed, 06 Mar 2013 16:42:05 +0900 |
parents | 4475ba30238f |
children | 91b6251ef6c8 |
files | scripts/showTopo.sh src/alice/codesegment/OutputDataSegment.java src/alice/test/codesegment/local/bitonicsort/LocalBitonicSort.java |
diffstat | 3 files changed, 45 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/showTopo.sh Wed Mar 06 16:42:05 2013 +0900 @@ -0,0 +1,7 @@ +#!/bin/bash +max=$1 +child_num=`expr $max - 1` +ruby ./topology/treen.rb $max 2 > ./topology/tree.dot +dot -Tpng ./topology/tree.dot > ./topology/tree.png +open ./topology/tree.png +
--- a/src/alice/codesegment/OutputDataSegment.java Wed Feb 27 06:30:14 2013 +0900 +++ b/src/alice/codesegment/OutputDataSegment.java Wed Mar 06 16:42:05 2013 +0900 @@ -10,6 +10,10 @@ public class OutputDataSegment { + /** + * for local + */ + public void put(String key, Value val) { DataSegment.getLocal().put(key, val); } @@ -34,10 +38,34 @@ } } + public void update(String key, Value val) { + DataSegment.getLocal().update(key, val); + } + + public void update(String key, String val) { + DataSegment.getLocal().update(key, ValueFactory.createRawValue(val)); + } + + public void update(String key, byte[] val) { + DataSegment.getLocal().update(key, ValueFactory.createRawValue(val, true)); + } + + public void update(String key, int val) { + DataSegment.getLocal().update(key, ValueFactory.createIntegerValue(val)); + } + + public <T> void update(String key, T val) { + try { + DataSegment.getLocal().update(key, SingletonMessage.getInstance().unconvert(val)); + } catch (IOException e) { + e.printStackTrace(); + } + } + /** * for remote - **/ + */ public void put(String managerKey, String key, Value val) { DataSegment.get(managerKey).put(key, val); @@ -63,30 +91,6 @@ } } - public void update(String key, Value val) { - DataSegment.getLocal().update(key, val); - } - - public void update(String key, String val) { - DataSegment.getLocal().update(key, ValueFactory.createRawValue(val)); - } - - public void update(String key, byte[] val) { - DataSegment.getLocal().update(key, ValueFactory.createRawValue(val, true)); - } - - public void update(String key, int val) { - DataSegment.getLocal().update(key, ValueFactory.createIntegerValue(val)); - } - - public <T> void update(String key, T val) { - try { - DataSegment.getLocal().update(key, SingletonMessage.getInstance().unconvert(val)); - } catch (IOException e) { - e.printStackTrace(); - } - } - public void update(String managerKey, String key, Value val) { DataSegment.get(managerKey).update(key, val); }
--- a/src/alice/test/codesegment/local/bitonicsort/LocalBitonicSort.java Wed Feb 27 06:30:14 2013 +0900 +++ b/src/alice/test/codesegment/local/bitonicsort/LocalBitonicSort.java Wed Mar 06 16:42:05 2013 +0900 @@ -1,8 +1,15 @@ package alice.test.codesegment.local.bitonicsort; +import alice.daemon.AliceDaemon; +import alice.daemon.Config; + public class LocalBitonicSort { public static void main(String[] args){ - SortConfig conf = new SortConfig(args); - new SetInfo(conf).execute(); + // logger off + Config conf = new Config(args); + new AliceDaemon(conf).listen(); + + SortConfig sconf = new SortConfig(args); + new SetInfo(sconf).execute(); } }