init
This commit is contained in:
13
src/main/java/com/yuandian/dataflow/Server.java
Normal file
13
src/main/java/com/yuandian/dataflow/Server.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.yuandian.dataflow;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class Server
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
1974
src/main/java/com/yuandian/dataflow/rpc/Scheduler.java
Normal file
1974
src/main/java/com/yuandian/dataflow/rpc/Scheduler.java
Normal file
File diff suppressed because it is too large
Load Diff
26
src/main/java/com/yuandian/dataflow/rpc/scheduler.proto
Normal file
26
src/main/java/com/yuandian/dataflow/rpc/scheduler.proto
Normal file
@@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package com.yuandian.dataflow.rpc;
|
||||
// option java_package = "com.yuandian.dataflow.rpc";
|
||||
|
||||
// option java_outer_classname = "com.yuandian.dataflow.rpc";
|
||||
|
||||
|
||||
service DataFlow {
|
||||
rpc Update (State) returns (Response);
|
||||
}
|
||||
|
||||
message State {
|
||||
map<int32, QueueState> QueueMap = 1;
|
||||
|
||||
}
|
||||
|
||||
message QueueState {
|
||||
int32 Size = 1;
|
||||
}
|
||||
|
||||
message Response {
|
||||
int32 Code = 1;
|
||||
string Message = 2;
|
||||
bytes Data = 3;
|
||||
}
|
||||
38
src/test/java/com/yuandian/dataflow/AppTest.java
Normal file
38
src/test/java/com/yuandian/dataflow/AppTest.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.yuandian.dataflow;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user