Mercurial > hg > Database > Christie
changeset 232:68b5958179d0
tsts
author | ichikitakahiro <e165713@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Jan 2020 19:49:40 +0900 |
parents | fddd6f6e7693 (diff) b312656c7ec0 (current diff) |
children | c8c8c447b2b3 |
files | |
diffstat | 18 files changed, 521 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/christie.log Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,5 @@ +2019-05-02 17:02:22,770 DEBUG christie.test.topology.paxos.acceptor.PromiseCodeGear - promise Proposal : number = 4, value = 2 [pool-1-thread-3] (PromiseCodeGear.java:31) +2019-05-02 17:02:22,770 DEBUG christie.test.topology.paxos.acceptor.PromiseCodeGear - promise Proposal : number = 3, value = 1 [pool-1-thread-2] (PromiseCodeGear.java:31) +2019-05-02 17:02:22,848 DEBUG christie.test.topology.paxos.proposer.SendPrepareRequestCodeGear - send prepare request : Proposal : number = 3, value = 1 [pool-1-thread-1] (SendPrepareRequestCodeGear.java:36) +2019-05-02 17:02:22,859 DEBUG christie.test.topology.paxos.proposer.SendPrepareRequestCodeGear - send prepare request : Proposal : number = 4, value = 2 [pool-1-thread-4] (SendPrepareRequestCodeGear.java:36) +2019-05-02 17:02:23,069 DEBUG christie.test.topology.paxos.acceptor.PromiseCodeGear - promise Proposal : number = 3, value = 1 [pool-1-thread-2] (PromiseCodeGear.java:31)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gradle/wrapper/gradle-wrapper.properties Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gradlew Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gradlew.bat Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/Log/manToMan.dot Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,4 @@ +digraph test { + node0 -> node1 [label="opponent"] + node1 -> node0 [label="opponent"] +}
--- a/src/main/java/christie/remotingTextEditor/StartManToManSession.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/main/java/christie/remotingTextEditor/StartManToManSession.java Tue Jan 21 19:49:40 2020 +0900 @@ -12,8 +12,9 @@ } public static void main(String[] args){ - int TopologyManagerPort = 10000; - int TopologyNodePort = 10001; + //ポート番号10000~1000xはone上では他のライブラリに使われている。(Net.javaにつかわれている?) + int TopologyManagerPort = 10100; + int TopologyNodePort = 10101; String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/manToMan.dot"};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/remotingTextEditor/StartManToManSession.java.orig Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,34 @@ +package christie.remotingTextEditor; + +import christie.codegear.CodeGearManager; +import christie.codegear.StartCodeGear; +import christie.topology.manager.StartTopologyManager; +import christie.topology.manager.TopologyManagerConfig; + +public class StartManToManSession extends StartCodeGear { + + public StartManToManSession(CodeGearManager cgm) { + super(cgm); + } + + public static void main(String[] args){ + int TopologyManagerPort = 10100; + int TopologyNodePort = 10101; + + String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/manToMan.dot"}; + + TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(managerArg); + new StartTopologyManager(topologyManagerConfig); + + + for (int i = 0; i <= 1; i++){ + String[] nodeArg = {"--managerPort", String.valueOf(TopologyManagerPort), + "--managerHost", "localhost", + "--localPort", String.valueOf(TopologyNodePort + i), + }; + + NodeStart.main(nodeArg); + + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/remotingTextEditor/StartManToManSession.java.rej Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,16 @@ +*************** +*** 13,19 **** + + public static void main(String[] args){ + //ポート番号10000~1000xはone上では他のライブラリに使われている。(Net.javaにつかわれている?) +- int TopologyManagerPort = 10100; + int TopologyNodePort = 10101; + + String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/manToMan.dot"}; +--- 13,18 ---- + + public static void main(String[] args){ + //ポート番号10000~1000xはone上では他のライブラリに使われている。(Net.javaにつかわれている?) + int TopologyNodePort = 10101; + + String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/manToMan.dot"};
--- a/src/main/java/christie/test/topology/paxos/StartLocalPaxos.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/main/java/christie/test/topology/paxos/StartLocalPaxos.java Tue Jan 21 19:49:40 2020 +0900 @@ -14,13 +14,13 @@ } - public static void main(String args[]){ + public static void main(String args[], int learnersNum1){ int proposerPort = 10000; int proposersNum = 2; int acceptorPort = proposerPort + proposersNum; int acceptorsNum = 3; int learnerPort = acceptorPort + acceptorsNum; - int learnersNum = 1; + int learnersNum = learnersNum1; List<CodeGearManager> proposers = new ArrayList<>(proposersNum); List<CodeGearManager> acceptors = new ArrayList<>(acceptorsNum);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/textEditor/main.java Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,8 @@ +package christie.textEditor; + +public class main { + public static void main(String[] args) { + mainFrame mF = mainFrame.getInstance(); + mF.setVisible(true); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/textEditor/mainFrame.java.orig Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,86 @@ +package christie.textEditor; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.event.KeyEvent; + +import java.io.File; +import java.io.IOException; + +import javax.swing.JDesktopPane; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.KeyStroke;; + +public class mainFrame extends JFrame{ + private JDesktopPane desktop; + + private JFileChooser fileChooser; + + private static mainFrame instance; + + private mainFrame(){ + //タイトルを設定 + super("テキストエディタ") ; + setSize(1024,768); + //ウィンドウを閉じたらアプリを終了する。 + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + //メインウィンドウにコンポーネントを配置する領域とのこと。 + Container container = this.getContentPane(); + + //メニューバーを初期化 + JMenuBar menuBar = new JMenuBar(); + //コンテナにメニューバーを配置する(ウインドウ上部に) + container.add(menuBar, BorderLayout.NORTH); + JMenu menuFile = new JMenu("ファイル"); + menuBar.add(menuFile); + //開くメニューの作成 + JMenuItem menuOpen = new JMenuItem(new menuActionOpen()); + //CTRT + oショートカットキーの設定 + menuOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0,KeyEvent.CTRL_DOWN_MASK)); + //ファイルメニューに開くを追加する + menuFile.add(menuOpen); + + desktop = new JDesktopPane(); + container.add(desktop); + + textFrame tF = new textFrame(); + desktop.add(tF); + tF.setVisible(true); + + //ファイル選択ダイアグの初期化 + fileChooser = new JFileChooser(); + //テキストファイル(*.txt)のみ表示するフィルターを追加 + //fileChooser.addChoosableFileFilter(new TextFileFilter()); + } + + void openFile(){ + //ファイルを開くダイアログを表示する + int result = fileChooser.showOpenDialog(this); + //ファイル選択時の処理 + if (JFileChooser.APPROVE_OPTION == result) { + File selectedFile = fileChooser.getSelectedFile(); + try{ + textFrame tF = new textFrame(selectedFile); + //JDesktopPaneにテキストウィンドウを追加 + desktop.add(tF); + tF.setVisible(true); + }catch(IOException e){ + JOptionPane.showMessageDialog(this, "IOExeption: ファイルを開くのに失敗しました。"); + } + } + } + + public static mainFrame getInstance(){ + if (instance == null){ + instance = new mainFrame(); + } + return instance; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/textEditor/menuActionOpen.java.orig Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,17 @@ +package christie.textEditor; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; + +class menuActionOpen extends AbstractAction{ + + @Override + public void actionPerformed(ActionEvent e){ + mainFrame.getInstance().openFile(); + } + + menuActionOpen(){ + super("開く"); + } +}
--- a/src/main/java/christie/textEditor/textFrame.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/main/java/christie/textEditor/textFrame.java Tue Jan 21 19:49:40 2020 +0900 @@ -28,9 +28,11 @@ public boolean send = false; + private String inserted_string; + private int sendLoc = 0; - public boolean canWrite = true; + private boolean canWrite = true; StyleContext sc = new StyleContext(); @@ -90,8 +92,8 @@ } } - public void insertText(){ - textArea.insert("send", 0); + public void insertText(int pos, String str){ + textArea.insert(str, pos); } public boolean SendPermission(){ @@ -106,7 +108,9 @@ return sendLoc; } + public void prohibitDL(){canWrite = false;} + public String returnString(){return inserted_string;} public class MyDocumentListener implements DocumentListener { public void insertUpdate(DocumentEvent e) { @@ -115,31 +119,16 @@ loc = e.getOffset(); sendLoc = loc; - //System.out.println("location = " + loc); try { - System.out.print("string = " + doc.getText(loc, 1) + "\n"); - } catch (BadLocationException e1){ + inserted_string = doc.getText(loc, 1); + System.out.println("string = " + doc.getText(loc, 1)); + } catch (BadLocationException e1) { e1.printStackTrace(); } send = true; + } + canWrite = true; - /* - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try { - canWrite = false; - doc.insertString(0, "kakikomi", sc.getStyle(StyleContext.DEFAULT_STYLE)); - canWrite = true; - //System.out.print("string = " + doc.getText(loc, 1) + "\n"); - } catch (BadLocationException e1) { - e1.printStackTrace(); - } - } - }); - */ - - } } @Override @@ -160,7 +149,7 @@ public void run() { try { doc.insertString(0, "kakikomi", sc.getStyle(StyleContext.DEFAULT_STYLE)); - //System.out.print("string = " + doc.getText(loc, 1) + "\n"); + //System.out.println("string = " + doc.getText(loc, 1)); } catch (BadLocationException e1) { e1.printStackTrace(); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/textEditor/textFrame.java.orig Tue Jan 21 19:49:40 2020 +0900 @@ -0,0 +1,68 @@ +package christie.textEditor; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +import javax.swing.JInternalFrame; +import javax.swing.JTextArea; + + + +public class textFrame extends JInternalFrame{ + private JTextArea textArea; + + private static String DEFAULT_CHARACTER_CODE = "Shift_JIS"; + + public textFrame(){ + this("新規テキスト"); + } + + public textFrame(String title){ + //JInternalFrameのコンストラクタの呼び出しを実行 + super(title, true, true, true , true); + //サイズの指定 + this.setSize(800,600); + // JTextArea(テキスト入力のコンポーネントを追加する。) + textArea = new JTextArea(); + this.add(textArea); + } + + public textFrame(File file) throws IOException { + this(file.getName()); + this.openFile(file); + } + + void openFile(File file) throws IOException{ + FileInputStream fiStream = null; + ByteArrayOutputStream baoStream = null; + try { + fiStream = new FileInputStream(file); + baoStream = new ByteArrayOutputStream(); + //読み込みデータ格納用配列 + byte[] byteData = new byte[1]; + int ret = fiStream.read(byteData); + //ファイルの最後まで繰り返す。 + while (ret != -1) { + baoStream.write(byteData); + ret = fiStream.read(byteData); + } + //バイト配列を文字列に変換 + String text = new String(baoStream.toByteArray(), DEFAULT_CHARACTER_CODE); + //テキストGUIに読み込んだファイルの内容を設定 + textArea.setText(text); + //タイトルを開いたファイル名へ変更 + this.setTitle(file.getName()); + }finally{ + if(fiStream != null){ + fiStream.close(); + } + if(baoStream != null){ + baoStream.close(); + } + } + } +}
--- a/src/test/java/christie/example/HelloWorld/HelloWorldCodeGear.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/test/java/christie/example/HelloWorld/HelloWorldCodeGear.java Tue Jan 21 19:49:40 2020 +0900 @@ -1,5 +1,6 @@ package christie.example.HelloWorld; +import christie.annotation.Peek; import christie.annotation.Take; import christie.codegear.CodeGear; import christie.codegear.CodeGearManager; @@ -14,4 +15,4 @@ System.out.print(helloWorld + " "); cgm.setup(new HelloWorldCodeGear()); } -} +} \ No newline at end of file
--- a/src/test/java/christie/example/PrefixTree/StartPrefixTree.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/test/java/christie/example/PrefixTree/StartPrefixTree.java Tue Jan 21 19:49:40 2020 +0900 @@ -17,7 +17,7 @@ public static void main(String[] args) { int topologyManagerPort = 10000; int topologyNodePort = 10001; - int nodeNum = 10; + int nodeNum = 8; String[] managerArg = {"--localPort", String.valueOf(topologyManagerPort), "--Topology", "tree"}; TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(managerArg); new StartTopologyManager(topologyManagerConfig);
--- a/src/test/java/christie/example/PrefixTree/sendOrDisplay.java Tue Jan 21 19:44:23 2020 +0900 +++ b/src/test/java/christie/example/PrefixTree/sendOrDisplay.java Tue Jan 21 19:49:40 2020 +0900 @@ -24,8 +24,7 @@ put("parent", "pushedNum", num); }else{ System.out.println("total:" + num); - - getDGM(topologyNodeConfig.getManagerKey()).put("FINISHMESSAGE", new Message()); + getDGM(topologyNodeConfig.getManagerKey()).put("FINISHMESSAGE", new Message()); } } }