.
6 |
--------------------------------------------------------------------------------
/conf/logging.properties:
--------------------------------------------------------------------------------
1 | # JDK_HOME/jre/lib/logging.properties
2 |
3 | handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
4 |
5 | .level=INFO
6 |
7 | com.almworks.sqlite4java.level=SEVERE
8 | com.almworks.sqlite4java.Internal.level=SEVERE
9 |
10 | # --- ConsoleHandler ---
11 | # Override of global logging level
12 | java.util.logging.ConsoleHandler.level=SEVERE
13 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
14 |
15 | # --- FileHandler ---
16 | # Override of global logging level
17 | java.util.logging.FileHandler.level=INFO
18 |
19 | # Naming style for the output file:
20 | # (The output file is placed in the directory
21 | # defined by the "user.home" System property.)
22 | java.util.logging.FileHandler.pattern=myria-%u.log
23 |
24 | # Limiting size of output file in bytes:
25 | java.util.logging.FileHandler.limit=5000000
26 |
27 | # Number of output files to cycle through, by appending an
28 | # integer to the base file name:
29 | java.util.logging.FileHandler.count=1
30 |
31 | # Style of output (Simple or XML):
32 | java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
33 |
--------------------------------------------------------------------------------
/conf/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel = debug
2 | org.slf4j.simpleLogger.showDateTime = true
3 | org.slf4j.simpleLogger.showShortLogName = true
4 | org.slf4j.simpleLogger.showLogName = false
5 | org.slf4j.simpleLogger.showThreadName = true
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Jun 08 14:06:49 PDT 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
7 |
--------------------------------------------------------------------------------
/ipc_pool_channel_statemachine.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/jsonQueries/apply_dominik/ingest_twitterk.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "public",
4 | "programName" : "adhoc",
5 | "relationName" : "TwitterK"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "File",
13 | "filename" : "/Users/dominik/Developer/Workspace/myria/data_nocommit/TwitterK.csv"
14 | },
15 | "delimiter": ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/broadcastJoin_shumo/broadcast_join_test.md:
--------------------------------------------------------------------------------
1 | ## Run the experiment
2 | 1. Import rank table
3 | `curl -i -XPOST dbserver02.cs.washington.edu:8759/dataset/importDataset -H "Content-type: application/json" -d @./importRankingTable.json`
4 | 2. Import user visit table
5 | `curl -i -XPOST dbserver02.cs.washington.edu:8759/dataset/importDataset -H "Content-type: application/json" -d @./importUserVisitsTable.json`
6 | 3. Submit broadcast join query
7 | `curl -i -XPOST dbserver02.cs.washington.edu:8759/query -H "Content-type: application/json" -d @./broadcast_join.json`
8 |
9 | ## Check the status of workers
10 | `curl -i dbserver02.cs.washington.edu:8759/workers/alive`
11 |
--------------------------------------------------------------------------------
/jsonQueries/broadcastJoin_shumo/importRankingTable.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "shumochu",
4 | "programName" : "broadcastjoin",
5 | "relationName" : "RankBase2x"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE","STRING_TYPE","LONG_TYPE"],
9 | "columnNames" : ["pageRank","pageURL","avgDuration"]
10 | },
11 | "importFromDatabase" : true
12 | }
13 |
--------------------------------------------------------------------------------
/jsonQueries/broadcastJoin_shumo/importUserVisitsTable.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "shumochu",
4 | "programName" : "broadcastjoin",
5 | "relationName" : "UserBase"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["STRING_TYPE","STRING_TYPE","DATETIME_TYPE","FLOAT_TYPE","STRING_TYPE","STRING_TYPE","STRING_TYPE","STRING_TYPE","LONG_TYPE"],
9 | "columnNames" : ["sourceIPAddr","destinationURL","visitDate","adRevenue","UserAgent","cCode","lCode","sKeyword", "avgTimeOnSite"]
10 | },
11 | "importFromDatabase" : true
12 | }
13 |
--------------------------------------------------------------------------------
/jsonQueries/broadcastJoin_shumo/ingest_smallTable.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "shumo_chu",
4 | "programName" : "broadcast_join",
5 | "relationName" : "smallTable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : 'File',
13 | "filename" : "/Users/steve/Project/myriad/jsonQueries/broadcastJoin_shumo/smallTable"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/jsonQueries/broadcastJoin_shumo/smallTable:
--------------------------------------------------------------------------------
1 | 1 44
2 | 2 51
3 | 46 17
4 | 63 34
5 | 54 63
6 | 20 94
7 | 12 66
8 | 79 42
9 | 1 10
10 | 88 20
11 | 10 42
12 | 56 44
13 | 10 12
14 | 79 37
15 | 30 66
16 | 83 13
17 | 31 1
18 | 31 99
19 | 81 35
20 | 70 26
21 | 4 51
22 | 15 66
23 | 88 66
24 | 27 17
25 | 31 82
26 | 76 74
27 | 96 65
28 | 62 22
29 | 90 59
30 | 13 29
31 | 44 42
32 | 35 62
33 | 99 15
34 | 95 77
35 | 10 70
36 | 24 30
37 | 82 64
38 | 44 48
39 | 65 74
40 | 18 85
41 | 49 14
42 | 75 99
43 | 57 95
44 | 42 96
45 | 41 69
46 | 14 65
47 | 16 11
48 | 72 22
49 | 76 82
50 | 66 68
51 | 74 88
52 | 47 6
53 | 56 0
54 | 6 9
55 | 50 80
56 | 6 31
57 | 76 44
58 | 49 30
59 | 47 16
60 | 82 77
61 | 1 81
62 | 20 40
63 | 18 56
64 | 28 92
65 | 58 16
66 | 82 13
67 | 71 75
68 | 60 41
69 | 23 9
70 | 2 51
71 | 86 95
72 | 8 81
73 | 97 79
74 | 18 41
75 | 89 48
76 | 59 51
77 | 21 86
78 | 63 76
79 | 42 22
80 | 73 38
81 | 24 17
82 | 8 34
83 | 78 15
84 | 93 15
85 | 31 22
86 | 73 29
87 | 93 16
88 | 87 95
89 | 5 57
90 | 42 88
91 | 15 87
92 | 38 97
93 | 0 76
94 | 57 51
95 | 30 19
96 | 52 28
97 | 42 14
98 | 73 28
99 | 37 69
100 | 43 47
101 |
--------------------------------------------------------------------------------
/jsonQueries/case_conversion/.gitignore:
--------------------------------------------------------------------------------
1 | doit.sed
2 |
--------------------------------------------------------------------------------
/jsonQueries/case_conversion/generate_convert_zsh.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | def fix(word):
4 | ret = ""
5 | flag = False
6 | for c in word:
7 | if c == '_':
8 | flag = True
9 | continue
10 | if flag:
11 | c = c.upper()
12 | flag = False
13 | ret += c
14 | return ret
15 | words = [line.strip() for line in open('keywords.txt', 'r') if len(line.strip())]
16 | fixed = [fix(word) for word in words]
17 |
18 | sed_dblqt_expr = [r"s#\"{}\"#\"{}\"#g".format(w,f) for w, f in zip(words, fixed)]
19 | sed_sglqt_expr = [r"s#'{}'#'{}'#g".format(w,f) for w, f in zip(words, fixed)]
20 |
21 | front = """for file in **/*.json **/*.py **/*.java
22 | do
23 | sed -i bak -e \""""
24 | middle = '\" \\\n -e \"'.join(sed_dblqt_expr + sed_sglqt_expr)
25 | end = """\" $file
26 | echo $file
27 | done"""
28 | print "%s%s%s" % (front, middle, end)
29 |
--------------------------------------------------------------------------------
/jsonQueries/come_to_the_party_jwang/expected_result:
--------------------------------------------------------------------------------
1 | 4
2 | 7
3 | 12
4 | 20
5 | 21
6 | 37
7 | 48
8 |
--------------------------------------------------------------------------------
/jsonQueries/come_to_the_party_jwang/ingest_organizer.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "party",
5 | "relationName" : "organizer"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE"],
9 | "columnNames" : ["p"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes": "MjAKNwo0OAo0CjM3Cg=="
14 | },
15 | "overwrite": true,
16 | "delimiter": " "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/come_to_the_party_jwang/organizer.csv:
--------------------------------------------------------------------------------
1 | 20
2 | 7
3 | 48
4 | 4
5 | 37
6 |
--------------------------------------------------------------------------------
/jsonQueries/connected_components_jwang/c:
--------------------------------------------------------------------------------
1 | 0 0
2 | 1 1
3 | 2 2
4 | 3 3
5 | 4 4
6 | 5 5
7 | 6 6
8 | 7 7
9 | 8 8
10 | 9 9
11 | 10 10
12 | 11 11
13 | 12 12
14 | 13 13
15 | 14 14
16 | 15 15
17 | 16 16
18 | 17 17
19 | 18 18
20 | 19 19
21 | 20 20
22 | 21 21
23 | 22 22
24 | 23 23
25 | 24 24
26 | 25 25
27 | 26 26
28 | 27 27
29 | 28 28
30 | 29 29
31 | 30 30
32 | 31 31
33 | 32 32
34 | 33 33
35 | 34 34
36 | 35 35
37 | 36 36
38 | 37 37
39 | 38 38
40 | 39 39
41 | 40 40
42 | 41 41
43 | 42 42
44 | 43 43
45 | 44 44
46 | 45 45
47 | 46 46
48 | 47 47
49 | 48 48
50 | 49 49
51 | 50 50
52 | 51 51
53 | 52 52
54 | 53 53
55 | 54 54
56 | 55 55
57 | 56 56
58 | 57 57
59 | 58 58
60 | 59 59
61 | 60 60
62 | 61 61
63 | 62 62
64 | 63 63
65 | 64 64
66 | 65 65
67 | 66 66
68 | 67 67
69 | 68 68
70 | 69 69
71 | 70 70
72 | 71 71
73 | 72 72
74 | 73 73
75 | 74 74
76 | 75 75
77 | 76 76
78 | 77 77
79 | 78 78
80 | 79 79
81 | 80 80
82 | 81 81
83 | 82 82
84 | 83 83
85 | 84 84
86 | 85 85
87 | 86 86
88 | 87 87
89 | 88 88
90 | 89 89
91 | 90 90
92 | 91 91
93 | 92 92
94 | 93 93
95 | 94 94
96 | 95 95
97 | 96 96
98 | 97 97
99 | 98 98
100 | 99 99
101 |
--------------------------------------------------------------------------------
/jsonQueries/connected_components_jwang/expected_result:
--------------------------------------------------------------------------------
1 | 0 0
2 | 35 0
3 | 49 0
4 | 63 0
5 | 96 0
6 | 34 0
7 | 2 0
8 | 27 0
9 | 32 0
10 | 44 0
11 | 3 0
12 | 47 0
13 | 95 0
14 | 23 0
15 | 60 0
16 | 55 0
17 | 65 0
18 | 20 0
19 | 36 0
20 | 84 0
21 | 90 0
22 | 21 0
23 | 76 0
24 | 24 0
25 | 39 0
26 | 25 0
27 | 53 0
28 | 12 0
29 | 41 0
30 | 22 0
31 | 29 0
32 | 97 0
33 | 69 0
34 | 74 0
35 | 82 0
36 | 17 0
37 | 59 0
38 | 26 0
39 | 18 0
40 | 33 0
41 | 98 0
42 | 85 0
43 | 15 0
44 | 16 0
45 | 43 0
46 | 30 0
47 | 38 0
48 | 50 0
49 | 89 0
50 | 28 0
51 | 1 0
52 | 88 0
53 | 37 0
54 | 14 0
55 | 92 0
56 | 56 0
57 | 62 0
58 | 73 0
59 | 75 0
60 | 72 0
61 | 64 0
62 | 81 0
63 | 57 0
64 | 68 0
65 | 86 0
66 | 19 0
67 | 54 0
68 | 70 0
69 | 61 0
70 | 11 0
71 | 67 0
72 | 58 0
73 | 9 0
74 | 77 0
75 | 79 0
76 | 7 0
77 | 78 0
78 | 99 0
79 | 8 0
80 | 71 0
81 | 80 0
82 | 93 0
83 | 10 0
84 | 52 0
85 | 40 0
86 | 94 0
87 | 83 0
88 | 51 0
89 | 46 0
90 | 4 4
91 | 13 4
92 | 5 5
93 | 6 6
94 | 31 31
95 | 42 42
96 | 45 45
97 | 48 48
98 | 66 66
99 | 87 87
100 | 91 91
101 |
--------------------------------------------------------------------------------
/jsonQueries/connected_components_jwang/ingest_c.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "connected_components",
5 | "relationName" : "c"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["node_id", "cluster_id"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MCAwCjEgMQoyIDIKMyAzCjQgNAo1IDUKNiA2CjcgNwo4IDgKOSA5CjEwIDEwCjExIDExCjEyIDEyCjEzIDEzCjE0IDE0CjE1IDE1CjE2IDE2CjE3IDE3CjE4IDE4CjE5IDE5CjIwIDIwCjIxIDIxCjIyIDIyCjIzIDIzCjI0IDI0CjI1IDI1CjI2IDI2CjI3IDI3CjI4IDI4CjI5IDI5CjMwIDMwCjMxIDMxCjMyIDMyCjMzIDMzCjM0IDM0CjM1IDM1CjM2IDM2CjM3IDM3CjM4IDM4CjM5IDM5CjQwIDQwCjQxIDQxCjQyIDQyCjQzIDQzCjQ0IDQ0CjQ1IDQ1CjQ2IDQ2CjQ3IDQ3CjQ4IDQ4CjQ5IDQ5CjUwIDUwCjUxIDUxCjUyIDUyCjUzIDUzCjU0IDU0CjU1IDU1CjU2IDU2CjU3IDU3CjU4IDU4CjU5IDU5CjYwIDYwCjYxIDYxCjYyIDYyCjYzIDYzCjY0IDY0CjY1IDY1CjY2IDY2CjY3IDY3CjY4IDY4CjY5IDY5CjcwIDcwCjcxIDcxCjcyIDcyCjczIDczCjc0IDc0Cjc1IDc1Cjc2IDc2Cjc3IDc3Cjc4IDc4Cjc5IDc5CjgwIDgwCjgxIDgxCjgyIDgyCjgzIDgzCjg0IDg0Cjg1IDg1Cjg2IDg2Cjg3IDg3Cjg4IDg4Cjg5IDg5CjkwIDkwCjkxIDkxCjkyIDkyCjkzIDkzCjk0IDk0Cjk1IDk1Cjk2IDk2Cjk3IDk3Cjk4IDk4Cjk5IDk5Cg=="
14 | },
15 | "delimiter": " "
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/galaxy_evolution_jwang/expected_result:
--------------------------------------------------------------------------------
1 | 0,1,2
2 | 0,1,3
3 | 0,1,4
4 | 1,2,4
5 | 1,4,1
6 | 1,4,4
7 | 2,1,3
8 | 2,1,4
9 | 2,4,0
10 | 2,4,2
11 | 3,0,1
12 | 3,3,0
13 | 3,4,0
14 | 3,4,2
15 |
--------------------------------------------------------------------------------
/jsonQueries/galaxy_evolution_jwang/galaxies_of_interest:
--------------------------------------------------------------------------------
1 | 0 0
2 | 0 1
3 |
--------------------------------------------------------------------------------
/jsonQueries/galaxy_evolution_jwang/ingest_galaxies_of_interest.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "galaxy_evolution",
5 | "relationName" : "galaxies_of_interest"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["t", "groupid"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes": "MCAwCjAgMQo="
14 | },
15 | "overwrite": true,
16 | "delimiter": " "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/getting_started/ingest_smallTable.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "global_join",
5 | "relationName" : "smallTable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["col1", "col2"]
10 | },
11 | "source" : {
12 | "dataType" : "File",
13 | "filename" : "/path/to/your/myria/jsonQueries/getting_started/smallTable"
14 | },
15 | "overwrite" : true,
16 | "delimiter": ","
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/getting_started/smallTable:
--------------------------------------------------------------------------------
1 | 1,44
2 | 2,51
3 | 46,17
4 | 63,34
5 | 54,63
6 | 20,94
7 | 12,66
8 | 79,42
9 | 1,10
10 | 88,20
11 | 10,42
12 | 56,44
13 | 10,12
14 | 79,37
15 | 30,66
16 | 83,13
17 | 31,1
18 | 31,99
19 | 81,35
20 | 70,26
21 | 4,51
22 | 15,66
23 | 88,66
24 | 27,17
25 | 31,82
26 | 76,74
27 | 96,65
28 | 62,22
29 | 90,59
30 | 13,29
31 | 44,42
32 | 35,62
33 | 99,15
34 | 95,77
35 | 10,70
36 | 24,30
37 | 82,64
38 | 44,48
39 | 65,74
40 | 18,85
41 | 49,14
42 | 75,99
43 | 57,95
44 | 42,96
45 | 41,69
46 | 14,65
47 | 16,11
48 | 72,22
49 | 76,82
50 | 66,68
51 | 74,88
52 | 47,6
53 | 56,0
54 | 6,9
55 | 50,80
56 | 6,31
57 | 76,44
58 | 49,30
59 | 47,16
60 | 82,77
61 | 1,81
62 | 20,40
63 | 18,56
64 | 28,92
65 | 58,16
66 | 82,13
67 | 71,75
68 | 60,41
69 | 23,9
70 | 2,51
71 | 86,95
72 | 8,81
73 | 97,79
74 | 18,41
75 | 89,48
76 | 59,51
77 | 21,86
78 | 63,76
79 | 42,22
80 | 73,38
81 | 24,17
82 | 8,34
83 | 78,15
84 | 93,15
85 | 31,22
86 | 73,29
87 | 93,16
88 | 87,95
89 | 5,57
90 | 42,88
91 | 15,87
92 | 38,97
93 | 0,76
94 | 57,51
95 | 30,19
96 | 52,28
97 | 42,14
98 | 73,28
99 | 37,69
100 | 43,47
101 |
--------------------------------------------------------------------------------
/jsonQueries/globalJoin_jwang/ingest_smallTable_workers.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "global_join",
5 | "relationName" : "smallTable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "overrideWorkers" : ["1","2"],
12 | "source" : {
13 | "dataType" : "Bytes",
14 | "bytes" : "MSA0NAoyIDUxCjQ2IDE3CjYzIDM0CjU0IDYzCjIwIDk0CjEyIDY2Cjc5IDQyCjEgMTAKODggMjAKMTAgNDIKNTYgNDQKMTAgMTIKNzkgMzcKMzAgNjYKODMgMTMKMzEgMQozMSA5OQo4MSAzNQo3MCAyNgo0IDUxCjE1IDY2Cjg4IDY2CjI3IDE3CjMxIDgyCjc2IDc0Cjk2IDY1CjYyIDIyCjkwIDU5CjEzIDI5CjQ0IDQyCjM1IDYyCjk5IDE1Cjk1IDc3CjEwIDcwCjI0IDMwCjgyIDY0CjQ0IDQ4CjY1IDc0CjE4IDg1CjQ5IDE0Cjc1IDk5CjU3IDk1CjQyIDk2CjQxIDY5CjE0IDY1CjE2IDExCjcyIDIyCjc2IDgyCjY2IDY4Cjc0IDg4CjQ3IDYKNTYgMAo2IDkKNTAgODAKNiAzMQo3NiA0NAo0OSAzMAo0NyAxNgo4MiA3NwoxIDgxCjIwIDQwCjE4IDU2CjI4IDkyCjU4IDE2CjgyIDEzCjcxIDc1CjYwIDQxCjIzIDkKMiA1MQo4NiA5NQo4IDgxCjk3IDc5CjE4IDQxCjg5IDQ4CjU5IDUxCjIxIDg2CjYzIDc2CjQyIDIyCjczIDM4CjI0IDE3CjggMzQKNzggMTUKOTMgMTUKMzEgMjIKNzMgMjkKOTMgMTYKODcgOTUKNSA1Nwo0MiA4OAoxNSA4NwozOCA5NwowIDc2CjU3IDUxCjMwIDE5CjUyIDI4CjQyIDE0CjczIDI4CjM3IDY5CjQzIDQ3Cg=="
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/globalJoin_jwang/smallTable:
--------------------------------------------------------------------------------
1 | 1 44
2 | 2 51
3 | 46 17
4 | 63 34
5 | 54 63
6 | 20 94
7 | 12 66
8 | 79 42
9 | 1 10
10 | 88 20
11 | 10 42
12 | 56 44
13 | 10 12
14 | 79 37
15 | 30 66
16 | 83 13
17 | 31 1
18 | 31 99
19 | 81 35
20 | 70 26
21 | 4 51
22 | 15 66
23 | 88 66
24 | 27 17
25 | 31 82
26 | 76 74
27 | 96 65
28 | 62 22
29 | 90 59
30 | 13 29
31 | 44 42
32 | 35 62
33 | 99 15
34 | 95 77
35 | 10 70
36 | 24 30
37 | 82 64
38 | 44 48
39 | 65 74
40 | 18 85
41 | 49 14
42 | 75 99
43 | 57 95
44 | 42 96
45 | 41 69
46 | 14 65
47 | 16 11
48 | 72 22
49 | 76 82
50 | 66 68
51 | 74 88
52 | 47 6
53 | 56 0
54 | 6 9
55 | 50 80
56 | 6 31
57 | 76 44
58 | 49 30
59 | 47 16
60 | 82 77
61 | 1 81
62 | 20 40
63 | 18 56
64 | 28 92
65 | 58 16
66 | 82 13
67 | 71 75
68 | 60 41
69 | 23 9
70 | 2 51
71 | 86 95
72 | 8 81
73 | 97 79
74 | 18 41
75 | 89 48
76 | 59 51
77 | 21 86
78 | 63 76
79 | 42 22
80 | 73 38
81 | 24 17
82 | 8 34
83 | 78 15
84 | 93 15
85 | 31 22
86 | 73 29
87 | 93 16
88 | 87 95
89 | 5 57
90 | 42 88
91 | 15 87
92 | 38 97
93 | 0 76
94 | 57 51
95 | 30 19
96 | 52 28
97 | 42 14
98 | 73 28
99 | 37 69
100 | 43 47
101 |
--------------------------------------------------------------------------------
/jsonQueries/hdfsImport_whitaker/ingest_small.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "whitaker",
4 | "programName" : "ingest_hdfs",
5 | "relationName" : "small"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["STRING_TYPE", "STRING_TYPE"],
9 | "columnNames" : ["source", "dest"]
10 | },
11 | "source" : {
12 | "dataType" : 'URI',
13 | "uri" : "hdfs://vega.cs.washington.edu:8020//whitaker/outputG/*"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/jsonQueries/join_for_vis_dominik/ingest_twitterk.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "public",
4 | "programName" : "adhoc",
5 | "relationName" : "TwitterK"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "File",
13 | "filename" : "/disk2/TwitterK.csv"
14 | },
15 | "delimiter": ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/lca_jwang/cites:
--------------------------------------------------------------------------------
1 | 35 22
2 | 8 0
3 | 12 28
4 | 35 3
5 | 25 11
6 | 42 18
7 | 13 17
8 | 37 49
9 | 4 15
10 | 32 38
11 | 6 41
12 | 0 1
13 | 5 30
14 | 22 6
15 | 27 48
16 | 33 35
17 | 16 5
18 | 43 33
19 | 47 0
20 | 11 20
21 | 34 16
22 | 28 21
23 | 32 40
24 | 48 47
25 | 38 5
26 | 16 22
27 | 20 24
28 | 31 9
29 | 38 10
30 | 20 21
31 | 30 20
32 | 15 33
33 | 20 46
34 | 29 7
35 | 24 30
36 | 39 42
37 | 30 18
38 | 41 31
39 | 4 3
40 | 31 40
41 | 19 10
42 | 22 22
43 | 4 27
44 | 2 7
45 | 41 19
46 | 12 11
47 | 18 26
48 | 10 5
49 | 9 21
50 | 43 14
51 |
--------------------------------------------------------------------------------
/jsonQueries/lca_jwang/ingest_cites.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "lca",
5 | "relationName" : "cites"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["pid1", "pid2"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes": "MzUgMjIKOCAwCjEyIDI4CjM1IDMKMjUgMTEKNDIgMTgKMTMgMTcKMzcgNDkKNCAxNQozMiAzOAo2IDQxCjAgMQo1IDMwCjIyIDYKMjcgNDgKMzMgMzUKMTYgNQo0MyAzMwo0NyAwCjExIDIwCjM0IDE2CjI4IDIxCjMyIDQwCjQ4IDQ3CjM4IDUKMTYgMjIKMjAgMjQKMzEgOQozOCAxMAoyMCAyMQozMCAyMAoxNSAzMwoyMCA0NgoyOSA3CjI0IDMwCjM5IDQyCjMwIDE4CjQxIDMxCjQgMwozMSA0MAoxOSAxMAoyMiAyMgo0IDI3CjIgNwo0MSAxOQoxMiAxMQoxOCAyNgoxMCA1CjkgMjEKNDMgMTQK"
14 | },
15 | "overwrite": true,
16 | "delimiter": " "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/lca_jwang/ingest_papers.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "lca",
5 | "relationName" : "papers"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["pid", "year"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes": "MCAyMDA4CjEgMTk3NwoyIDE5NzIKMyAxOTY4CjQgMTk2OQo1IDE5NzEKNiAxOTkzCjcgMTk4MAo4IDIwMDcKOSAyMDAyCjEwIDE5NjMKMTEgMTk5NAoxMiAxOTgzCjEzIDE5NjEKMTQgMjAwOAoxNSAxOTc1CjE2IDIwMDgKMTcgMjAwMwoxOCAyMDAwCjE5IDE5NzcKMjAgMjAwMAoyMSAyMDA3CjIyIDE5ODEKMjMgMTk4OQoyNCAxOTc0CjI1IDE5OTEKMjYgMTk4OQoyNyAxOTg4CjI4IDE5OTQKMjkgMTk5OAozMCAxOTY4CjMxIDE5OTkKMzIgMTk4OQozMyAxOTcwCjM0IDE5NzEKMzUgMTk2OQozNiAxOTc4CjM3IDE5OTUKMzggMTk5NQozOSAxOTk1CjQwIDE5NjUKNDEgMTk3Mwo0MiAxOTYwCjQzIDE5NjEKNDQgMTk4OQo0NSAyMDAyCjQ2IDE5NzMKNDcgMTk4Mwo0OCAyMDA0CjQ5IDIwMDcK"
14 | },
15 | "overwrite": true,
16 | "delimiter": " "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/lca_jwang/papers:
--------------------------------------------------------------------------------
1 | 0 2008
2 | 1 1977
3 | 2 1972
4 | 3 1968
5 | 4 1969
6 | 5 1971
7 | 6 1993
8 | 7 1980
9 | 8 2007
10 | 9 2002
11 | 10 1963
12 | 11 1994
13 | 12 1983
14 | 13 1961
15 | 14 2008
16 | 15 1975
17 | 16 2008
18 | 17 2003
19 | 18 2000
20 | 19 1977
21 | 20 2000
22 | 21 2007
23 | 22 1981
24 | 23 1989
25 | 24 1974
26 | 25 1991
27 | 26 1989
28 | 27 1988
29 | 28 1994
30 | 29 1998
31 | 30 1968
32 | 31 1999
33 | 32 1989
34 | 33 1970
35 | 34 1971
36 | 35 1969
37 | 36 1978
38 | 37 1995
39 | 38 1995
40 | 39 1995
41 | 40 1965
42 | 41 1973
43 | 42 1960
44 | 43 1961
45 | 44 1989
46 | 45 2002
47 | 46 1973
48 | 47 1983
49 | 48 2004
50 | 49 2007
51 |
--------------------------------------------------------------------------------
/jsonQueries/lsst_vaspol/ingest_lsst.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "vaspol",
4 | "programName" : "LSST_useCase",
5 | "relationName" : "testtable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE","LONG_TYPE","LONG_TYPE","DOUBLE_TYPE"],
9 | "columnNames" : ["x","y","time","data"]
10 | },
11 | "source" : {
12 | "dataType" : 'File',
13 | "filename" : "/disk1/lsst_dataset/large.csv",
14 | },
15 | "delimiter" : ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/lsst_vaspol/ingest_lsst_small.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "vaspol",
4 | "programName" : "LSST_useCase",
5 | "relationName" : "testtable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE","LONG_TYPE","LONG_TYPE","DOUBLE_TYPE"],
9 | "columnNames" : ["x","y","time","data"]
10 | },
11 | "source" : {
12 | "dataType" : 'File',
13 | "filename" : "/disk1/lsst_dataset/small.csv"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/a0:
--------------------------------------------------------------------------------
1 | 10 43
2 | 72 59
3 | 97 43
4 | 29 20
5 | 43 80
6 | 7 90
7 | 37 93
8 | 42 16
9 | 24 12
10 | 75 5
11 | 63 18
12 | 14 33
13 | 9 56
14 | 69 34
15 | 97 7
16 | 55 44
17 | 59 9
18 | 11 72
19 | 45 99
20 | 5 68
21 | 65 69
22 | 69 18
23 | 48 43
24 | 78 43
25 | 12 54
26 | 36 68
27 | 34 48
28 | 31 49
29 | 63 79
30 | 80 75
31 | 17 14
32 | 11 9
33 | 50 43
34 | 47 27
35 | 86 79
36 | 64 19
37 | 34 50
38 | 59 96
39 | 36 25
40 | 80 30
41 | 47 66
42 | 91 17
43 | 17 70
44 | 34 94
45 | 1 67
46 | 14 13
47 | 37 77
48 | 23 96
49 | 80 35
50 | 53 83
51 | 0 79
52 | 3 22
53 | 60 11
54 | 21 51
55 | 33 43
56 | 55 15
57 | 40 93
58 | 12 78
59 | 1 35
60 | 88 81
61 | 69 1
62 | 79 47
63 | 77 23
64 | 68 96
65 | 53 52
66 | 44 21
67 | 68 92
68 | 42 79
69 | 73 29
70 | 96 29
71 | 14 58
72 | 27 51
73 | 78 46
74 | 53 82
75 | 52 60
76 | 65 64
77 | 95 86
78 | 67 46
79 | 29 13
80 | 45 51
81 | 39 52
82 | 14 93
83 | 95 71
84 | 21 92
85 | 66 34
86 | 77 45
87 | 45 15
88 | 13 40
89 | 49 95
90 | 44 64
91 | 32 72
92 | 68 90
93 | 1 70
94 | 91 9
95 | 44 55
96 | 60 91
97 | 4 93
98 | 14 17
99 | 0 64
100 | 63 83
101 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/b0:
--------------------------------------------------------------------------------
1 | 24 41
2 | 24 28
3 | 10 40
4 | 70 29
5 | 95 51
6 | 40 73
7 | 27 77
8 | 69 75
9 | 31 70
10 | 8 29
11 | 22 9
12 | 85 53
13 | 35 75
14 | 20 43
15 | 29 30
16 | 55 2
17 | 36 43
18 | 84 91
19 | 56 3
20 | 69 63
21 | 99 19
22 | 8 96
23 | 24 33
24 | 87 31
25 | 0 21
26 | 91 27
27 | 50 36
28 | 20 29
29 | 64 77
30 | 46 81
31 | 67 99
32 | 62 57
33 | 58 2
34 | 1 43
35 | 48 45
36 | 13 34
37 | 4 82
38 | 42 77
39 | 68 97
40 | 83 21
41 | 83 54
42 | 49 25
43 | 57 13
44 | 50 55
45 | 9 69
46 | 43 12
47 | 0 94
48 | 80 34
49 | 65 15
50 | 29 24
51 | 8 26
52 | 45 78
53 | 34 80
54 | 28 45
55 | 74 4
56 | 79 30
57 | 83 49
58 | 35 27
59 | 85 33
60 | 30 5
61 | 89 15
62 | 67 16
63 | 67 65
64 | 0 9
65 | 65 29
66 | 34 57
67 | 32 2
68 | 29 74
69 | 16 53
70 | 91 37
71 | 47 26
72 | 56 65
73 | 16 79
74 | 33 93
75 | 22 25
76 | 62 66
77 | 85 77
78 | 75 45
79 | 7 86
80 | 61 56
81 | 85 17
82 | 40 86
83 | 71 12
84 | 14 80
85 | 4 55
86 | 29 39
87 | 71 91
88 | 1 73
89 | 2 66
90 | 43 11
91 | 55 59
92 | 18 74
93 | 1 93
94 | 36 85
95 | 90 1
96 | 48 80
97 | 80 76
98 | 17 38
99 | 90 39
100 | 74 93
101 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/c0:
--------------------------------------------------------------------------------
1 | 38 92
2 | 23 97
3 | 23 84
4 | 58 38
5 | 94 75
6 | 20 56
7 | 64 61
8 | 43 34
9 | 91 28
10 | 41 6
11 | 81 0
12 | 9 73
13 | 8 94
14 | 18 52
15 | 14 6
16 | 55 7
17 | 60 77
18 | 10 57
19 | 20 54
20 | 33 5
21 | 86 69
22 | 0 21
23 | 47 23
24 | 96 66
25 | 41 88
26 | 99 86
27 | 19 77
28 | 9 9
29 | 65 75
30 | 12 40
31 | 17 84
32 | 13 58
33 | 66 61
34 | 8 59
35 | 57 64
36 | 62 49
37 | 27 61
38 | 25 58
39 | 0 22
40 | 39 65
41 | 66 42
42 | 7 80
43 | 97 56
44 | 13 16
45 | 17 71
46 | 19 58
47 | 63 11
48 | 37 19
49 | 50 42
50 | 58 65
51 | 63 73
52 | 40 87
53 | 61 49
54 | 88 39
55 | 15 65
56 | 3 98
57 | 26 5
58 | 58 29
59 | 69 84
60 | 19 82
61 | 9 82
62 | 55 85
63 | 57 54
64 | 32 69
65 | 30 53
66 | 24 40
67 | 96 59
68 | 16 16
69 | 59 30
70 | 86 92
71 | 33 94
72 | 38 32
73 | 54 12
74 | 13 4
75 | 45 90
76 | 59 68
77 | 28 15
78 | 36 44
79 | 85 59
80 | 24 14
81 | 84 82
82 | 19 26
83 | 47 6
84 | 7 21
85 | 42 23
86 | 34 33
87 | 50 20
88 | 42 53
89 | 2 84
90 | 95 58
91 | 25 46
92 | 15 58
93 | 48 63
94 | 34 61
95 | 89 94
96 | 89 69
97 | 3 12
98 | 73 59
99 | 27 67
100 | 85 3
101 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/ingest_a0.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "multiIDB",
5 | "relationName" : "a0"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MTAgNDMKNzIgNTkKOTcgNDMKMjkgMjAKNDMgODAKNyA5MAozNyA5Mwo0MiAxNgoyNCAxMgo3NSA1CjYzIDE4CjE0IDMzCjkgNTYKNjkgMzQKOTcgNwo1NSA0NAo1OSA5CjExIDcyCjQ1IDk5CjUgNjgKNjUgNjkKNjkgMTgKNDggNDMKNzggNDMKMTIgNTQKMzYgNjgKMzQgNDgKMzEgNDkKNjMgNzkKODAgNzUKMTcgMTQKMTEgOQo1MCA0Mwo0NyAyNwo4NiA3OQo2NCAxOQozNCA1MAo1OSA5NgozNiAyNQo4MCAzMAo0NyA2Ngo5MSAxNwoxNyA3MAozNCA5NAoxIDY3CjE0IDEzCjM3IDc3CjIzIDk2CjgwIDM1CjUzIDgzCjAgNzkKMyAyMgo2MCAxMQoyMSA1MQozMyA0Mwo1NSAxNQo0MCA5MwoxMiA3OAoxIDM1Cjg4IDgxCjY5IDEKNzkgNDcKNzcgMjMKNjggOTYKNTMgNTIKNDQgMjEKNjggOTIKNDIgNzkKNzMgMjkKOTYgMjkKMTQgNTgKMjcgNTEKNzggNDYKNTMgODIKNTIgNjAKNjUgNjQKOTUgODYKNjcgNDYKMjkgMTMKNDUgNTEKMzkgNTIKMTQgOTMKOTUgNzEKMjEgOTIKNjYgMzQKNzcgNDUKNDUgMTUKMTMgNDAKNDkgOTUKNDQgNjQKMzIgNzIKNjggOTAKMSA3MAo5MSA5CjQ0IDU1CjYwIDkxCjQgOTMKMTQgMTcKMCA2NAo2MyA4Mwo="
14 | },
15 | "delimiter":" "
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/ingest_b0.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "multiIDB",
5 | "relationName" : "b0"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MjQgNDEKMjQgMjgKMTAgNDAKNzAgMjkKOTUgNTEKNDAgNzMKMjcgNzcKNjkgNzUKMzEgNzAKOCAyOQoyMiA5Cjg1IDUzCjM1IDc1CjIwIDQzCjI5IDMwCjU1IDIKMzYgNDMKODQgOTEKNTYgMwo2OSA2Mwo5OSAxOQo4IDk2CjI0IDMzCjg3IDMxCjAgMjEKOTEgMjcKNTAgMzYKMjAgMjkKNjQgNzcKNDYgODEKNjcgOTkKNjIgNTcKNTggMgoxIDQzCjQ4IDQ1CjEzIDM0CjQgODIKNDIgNzcKNjggOTcKODMgMjEKODMgNTQKNDkgMjUKNTcgMTMKNTAgNTUKOSA2OQo0MyAxMgowIDk0CjgwIDM0CjY1IDE1CjI5IDI0CjggMjYKNDUgNzgKMzQgODAKMjggNDUKNzQgNAo3OSAzMAo4MyA0OQozNSAyNwo4NSAzMwozMCA1Cjg5IDE1CjY3IDE2CjY3IDY1CjAgOQo2NSAyOQozNCA1NwozMiAyCjI5IDc0CjE2IDUzCjkxIDM3CjQ3IDI2CjU2IDY1CjE2IDc5CjMzIDkzCjIyIDI1CjYyIDY2Cjg1IDc3Cjc1IDQ1CjcgODYKNjEgNTYKODUgMTcKNDAgODYKNzEgMTIKMTQgODAKNCA1NQoyOSAzOQo3MSA5MQoxIDczCjIgNjYKNDMgMTEKNTUgNTkKMTggNzQKMSA5MwozNiA4NQo5MCAxCjQ4IDgwCjgwIDc2CjE3IDM4CjkwIDM5Cjc0IDkzCg=="
14 | }
15 | ,
16 | "delimiter":" "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/ingest_c0.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "multiIDB",
5 | "relationName" : "c0"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MzggOTIKMjMgOTcKMjMgODQKNTggMzgKOTQgNzUKMjAgNTYKNjQgNjEKNDMgMzQKOTEgMjgKNDEgNgo4MSAwCjkgNzMKOCA5NAoxOCA1MgoxNCA2CjU1IDcKNjAgNzcKMTAgNTcKMjAgNTQKMzMgNQo4NiA2OQowIDIxCjQ3IDIzCjk2IDY2CjQxIDg4Cjk5IDg2CjE5IDc3CjkgOQo2NSA3NQoxMiA0MAoxNyA4NAoxMyA1OAo2NiA2MQo4IDU5CjU3IDY0CjYyIDQ5CjI3IDYxCjI1IDU4CjAgMjIKMzkgNjUKNjYgNDIKNyA4MAo5NyA1NgoxMyAxNgoxNyA3MQoxOSA1OAo2MyAxMQozNyAxOQo1MCA0Mgo1OCA2NQo2MyA3Mwo0MCA4Nwo2MSA0OQo4OCAzOQoxNSA2NQozIDk4CjI2IDUKNTggMjkKNjkgODQKMTkgODIKOSA4Mgo1NSA4NQo1NyA1NAozMiA2OQozMCA1MwoyNCA0MAo5NiA1OQoxNiAxNgo1OSAzMAo4NiA5MgozMyA5NAozOCAzMgo1NCAxMgoxMyA0CjQ1IDkwCjU5IDY4CjI4IDE1CjM2IDQ0Cjg1IDU5CjI0IDE0Cjg0IDgyCjE5IDI2CjQ3IDYKNyAyMQo0MiAyMwozNCAzMwo1MCAyMAo0MiA1MwoyIDg0Cjk1IDU4CjI1IDQ2CjE1IDU4CjQ4IDYzCjM0IDYxCjg5IDk0Cjg5IDY5CjMgMTIKNzMgNTkKMjcgNjcKODUgMwo="
14 | },
15 | "delimiter":" "
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/ingest_r.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "multiIDB",
5 | "relationName" : "r"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MyA5NAo0NiA0OAoxNCA3MQo4NSA4OQoyMCAxOAoxNCAyNQo5MiA1MQo1NSA2MAo0NCA4MwozNSA5Mwo3IDk2CjUgMjMKOTYgNzAKNzAgMwoyOCAxOQo1IDE4CjQ3IDQyCjQ4IDM5CjEzIDUwCjczIDQ3CjQ1IDQ0CjIzIDI5CjYzIDk4Cjk3IDk5CjE4IDk3CjgyIDYyCjczIDUxCjYzIDYKMzkgMzAKNTAgNzIKNDIgOTUKOSAzMgo5NiA5MAoxNyAxOQo1IDQ2CjY2IDM4CjQ2IDg0Cjk0IDgyCjIwIDg5CjIgOAo3OSA3Mgo2MiAxNgo0NyAyMgoyOSAzNwo5NyA2OQoyNiA5MAozMiA0Mgo3MSA3Nwo2NCA0NQo2MiAzOQo5OSA4Mgo3OSA5NAoyMyA1Mwo5MSA1NAo4NiA4Ngo5MyAzMQo5NSA2NQoyNCAyNwo1OSAzNgoyMCA2OQo5IDkxCjg1IDM5CjgyIDU1CjIgNjYKNDcgOTAKNDkgNTYKODYgNDAKNzUgNQoyNSAxNwo3MiA3NQoyNCAyNwo4OSA5NAo5IDU2CjYwIDUwCjY0IDEKOTMgMTMKMCA2Nwo2MCA3MAo4NyAwCjQwIDcyCjE2IDkzCjQ4IDIzCjU3IDI0CjEgNDgKNDcgNDcKNTEgOTgKODIgNzcKNjkgOTcKOTkgMzYKNjggMTcKNDcgMgo0MyA5OAo1NCA4NQo0MiAyNAo2OCA4Mgo2MyAyMwo2OSAyNQozNiA4Mwo1IDAKODQgNzgK"
14 | },
15 | "delimiter":" "
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/multiIDB_jwang/r:
--------------------------------------------------------------------------------
1 | 3 94
2 | 46 48
3 | 14 71
4 | 85 89
5 | 20 18
6 | 14 25
7 | 92 51
8 | 55 60
9 | 44 83
10 | 35 93
11 | 7 96
12 | 5 23
13 | 96 70
14 | 70 3
15 | 28 19
16 | 5 18
17 | 47 42
18 | 48 39
19 | 13 50
20 | 73 47
21 | 45 44
22 | 23 29
23 | 63 98
24 | 97 99
25 | 18 97
26 | 82 62
27 | 73 51
28 | 63 6
29 | 39 30
30 | 50 72
31 | 42 95
32 | 9 32
33 | 96 90
34 | 17 19
35 | 5 46
36 | 66 38
37 | 46 84
38 | 94 82
39 | 20 89
40 | 2 8
41 | 79 72
42 | 62 16
43 | 47 22
44 | 29 37
45 | 97 69
46 | 26 90
47 | 32 42
48 | 71 77
49 | 64 45
50 | 62 39
51 | 99 82
52 | 79 94
53 | 23 53
54 | 91 54
55 | 86 86
56 | 93 31
57 | 95 65
58 | 24 27
59 | 59 36
60 | 20 69
61 | 9 91
62 | 85 39
63 | 82 55
64 | 2 66
65 | 47 90
66 | 49 56
67 | 86 40
68 | 75 5
69 | 25 17
70 | 72 75
71 | 24 27
72 | 89 94
73 | 9 56
74 | 60 50
75 | 64 1
76 | 93 13
77 | 0 67
78 | 60 70
79 | 87 0
80 | 40 72
81 | 16 93
82 | 48 23
83 | 57 24
84 | 1 48
85 | 47 47
86 | 51 98
87 | 82 77
88 | 69 97
89 | 99 36
90 | 68 17
91 | 47 2
92 | 43 98
93 | 54 85
94 | 42 24
95 | 68 82
96 | 63 23
97 | 69 25
98 | 36 83
99 | 5 0
100 | 84 78
101 |
--------------------------------------------------------------------------------
/jsonQueries/multiwayJoin_shumo/README.md:
--------------------------------------------------------------------------------
1 | 1. Ingest data
2 | `curl -i -XPOST localhost:8753/dataset -H "Content-type: application/json" -d @./ingest_twitter_small.json`
3 | 2. Execute query
4 | `curl -i -XPOST localhost:8753/query -H "Content-type: application/json" -d @./two_dimension_multiway_join.json`
5 |
--------------------------------------------------------------------------------
/jsonQueries/multiwayJoin_shumo/ingest_twitter_small.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "chushumo",
4 | "programName" : "multiway_join",
5 | "relationName" : "twitter_small"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["follower", "followee"]
10 | },
11 | "source" : {
12 | "dataType" : "File",
13 | "filename" : "/disk1/datasets/twitter/twitter_62000.txt"
14 | },
15 | "delimiter": ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/nchilada_leelee/ingest_1380.json:
--------------------------------------------------------------------------------
1 | {
2 | "nchiladaDirectoryName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001380",
3 | "groupFileName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001380.rockstar.grp",
4 | "relationKey": {
5 | "programName": "adhoc",
6 | "relationName": "snapshot1380",
7 | "userName": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/jsonQueries/nchilada_leelee/ingest_1387.json:
--------------------------------------------------------------------------------
1 | {
2 | "nchiladaDirectoryName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001387",
3 | "groupFileName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001387.rockstar.grp",
4 | "relationKey": {
5 | "programName": "adhoc",
6 | "relationName": "snapshot1387",
7 | "userName": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/jsonQueries/nchilada_leelee/ingest_1469.json:
--------------------------------------------------------------------------------
1 | {
2 | "nchiladaDirectoryName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001469",
3 | "groupFileName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001469.rockstar.grp",
4 | "relationKey": {
5 | "programName": "adhoc",
6 | "relationName": "snapshot1469",
7 | "userName": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/jsonQueries/nchilada_leelee/ingest_1536.json:
--------------------------------------------------------------------------------
1 | {
2 | "nchiladaDirectoryName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001536",
3 | "groupFileName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001536.rockstar.grp",
4 | "relationKey": {
5 | "programName": "adhoc",
6 | "relationName": "snapshot1536",
7 | "userName": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/jsonQueries/nchilada_leelee/ingest_1556.json:
--------------------------------------------------------------------------------
1 | {
2 | "nchiladaDirectoryName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001556",
3 | "groupFileName": "hdfs://vega.cs.washington.edu:8020//datasets/cosmo25p.768sg1bwK1C52/cosmo25p.768sg1bwK1C52.001556.rockstar.grp",
4 | "relationKey": {
5 | "programName": "adhoc",
6 | "relationName": "snapshot1556",
7 | "userName": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/jsonQueries/pythonUDF/ingest_blob.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "public",
4 | "programName" : "adhoc",
5 | "relationName" : "manifest"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE","LONG_TYPE","STRING_TYPE"],
9 | "columnNames" : ["id", "subjid","imgid" ,"image"]
10 | },
11 | "source" : {
12 | "dataType" : "URI",
13 | "uri" : "s3://imagedb-data/dmridatasample.csv"
14 | },
15 | "delimiter": ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/reachability/ingest_a0.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "reachability",
5 | "relationName" : "a0"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE"],
9 | "columnNames" : ["follower"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes" : "MTIK"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/jsonQueries/same_generation_jwang/arc.csv:
--------------------------------------------------------------------------------
1 | 19 37
2 | 45 34
3 | 21 44
4 | 11 39
5 | 17 1
6 | 49 33
7 | 44 18
8 | 42 10
9 | 25 34
10 | 32 19
11 | 24 0
12 | 28 16
13 | 49 22
14 | 43 46
15 | 22 34
16 | 41 8
17 | 30 37
18 | 37 5
19 | 42 48
20 | 23 5
21 | 9 12
22 | 44 19
23 | 34 19
24 | 45 47
25 | 37 12
26 | 25 38
27 | 36 6
28 | 19 12
29 | 28 2
30 | 47 25
31 | 20 22
32 | 47 28
33 | 48 33
34 | 7 20
35 | 33 0
36 | 28 26
37 | 25 29
38 | 37 35
39 | 49 2
40 | 33 47
41 | 44 14
42 | 44 8
43 | 42 41
44 | 22 4
45 | 25 45
46 | 31 43
47 | 5 6
48 | 47 27
49 | 6 10
50 | 48 40
51 | 32 1
52 | 8 45
53 | 41 6
54 | 2 19
55 | 38 40
56 | 3 14
57 | 0 26
58 | 34 48
59 | 20 10
60 | 6 17
61 | 27 18
62 | 31 3
63 | 19 36
64 | 31 7
65 | 29 47
66 | 22 11
67 | 40 26
68 | 21 7
69 | 23 37
70 | 23 7
71 | 29 10
72 | 48 18
73 | 37 26
74 | 42 38
75 | 14 27
76 | 38 10
77 | 29 8
78 | 20 26
79 | 17 44
80 | 13 20
81 | 37 29
82 | 3 31
83 | 10 32
84 | 40 43
85 | 14 22
86 | 3 28
87 | 41 40
88 | 41 38
89 | 14 34
90 | 5 0
91 | 13 38
92 | 38 12
93 | 24 17
94 | 31 47
95 | 42 35
96 | 34 45
97 | 10 37
98 | 11 33
99 | 49 27
100 | 6 0
101 |
--------------------------------------------------------------------------------
/jsonQueries/same_generation_jwang/ingest_arc.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "jwang",
4 | "programName" : "sg",
5 | "relationName" : "arc"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["LONG_TYPE", "LONG_TYPE"],
9 | "columnNames" : ["node_id_1", "node_id_2"]
10 | },
11 | "source" : {
12 | "dataType" : "Bytes",
13 | "bytes": "MTkgMzcKNDUgMzQKMjEgNDQKMTEgMzkKMTcgMQo0OSAzMwo0NCAxOAo0MiAxMAoyNSAzNAozMiAxOQoyNCAwCjI4IDE2CjQ5IDIyCjQzIDQ2CjIyIDM0CjQxIDgKMzAgMzcKMzcgNQo0MiA0OAoyMyA1CjkgMTIKNDQgMTkKMzQgMTkKNDUgNDcKMzcgMTIKMjUgMzgKMzYgNgoxOSAxMgoyOCAyCjQ3IDI1CjIwIDIyCjQ3IDI4CjQ4IDMzCjcgMjAKMzMgMAoyOCAyNgoyNSAyOQozNyAzNQo0OSAyCjMzIDQ3CjQ0IDE0CjQ0IDgKNDIgNDEKMjIgNAoyNSA0NQozMSA0Mwo1IDYKNDcgMjcKNiAxMAo0OCA0MAozMiAxCjggNDUKNDEgNgoyIDE5CjM4IDQwCjMgMTQKMCAyNgozNCA0OAoyMCAxMAo2IDE3CjI3IDE4CjMxIDMKMTkgMzYKMzEgNwoyOSA0NwoyMiAxMQo0MCAyNgoyMSA3CjIzIDM3CjIzIDcKMjkgMTAKNDggMTgKMzcgMjYKNDIgMzgKMTQgMjcKMzggMTAKMjkgOAoyMCAyNgoxNyA0NAoxMyAyMAozNyAyOQozIDMxCjEwIDMyCjQwIDQzCjE0IDIyCjMgMjgKNDEgNDAKNDEgMzgKMTQgMzQKNSAwCjEzIDM4CjM4IDEyCjI0IDE3CjMxIDQ3CjQyIDM1CjM0IDQ1CjEwIDM3CjExIDMzCjQ5IDI3CjYgMAo="
14 | },
15 | "overwrite": true,
16 | "delimiter": " "
17 | }
18 |
--------------------------------------------------------------------------------
/jsonQueries/sample_queries/select_and_insert.json:
--------------------------------------------------------------------------------
1 | {
2 | "fragments": [
3 | {
4 | "operators": [
5 | {
6 | "opId": 0,
7 | "opType": "TableScan",
8 | "relationKey": {
9 | "programName": "global_join",
10 | "relationName": "smallTable",
11 | "userName": "jwang"
12 | }
13 | },
14 | {
15 | "argChild": 0,
16 | "opId": 1,
17 | "opType": "DbInsert",
18 | "relationKey": {
19 | "programName": "global_join",
20 | "relationName": "smallTable2",
21 | "userName": "jwang"
22 | }
23 | }
24 | ]
25 | }
26 | ],
27 | "logicalRa": "Insert[Scan[smallTable], smallTable2]",
28 | "rawQuery": "smallTable2(_) :- smallTable(_)."
29 | }
30 |
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/cosmo/README.md:
--------------------------------------------------------------------------------
1 | To ingest all the snapshots data:
2 |
3 | bash ingest_all_cosmo.sh
4 |
5 | To ingest individual snapshot data:
6 |
7 | curl -i -XPOST beijing.cs.washington.edu:8777/dataset/tipsy -H "Content-type: application/json" -d @./ingest_cosmo512.json
8 |
9 | All the JSON files to ingest snapshot data are generated by running:
10 |
11 | bash generate_ingest_tipsy.sh
12 |
13 |
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/cosmo/generate_ingest_tipsy.sh:
--------------------------------------------------------------------------------
1 | touch "ingest_all_cosmo.sh"
2 | for VARIABLE in 024 048 072 084 096 128 144 168 192 216 226 240 264 288 312 328 336 384 406 408 432 455 456 466 480 504 512
3 | do
4 | touch "ingest_cosmo$VARIABLE.json"
5 | echo -e "{ \n\
6 | \"grp_filename\": \"/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00$VARIABLE.amiga.grp\",\n\
7 | \"iorder_filename\": \"/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00$VARIABLE.iord\",\n\
8 | \"relation_key\": {\n\
9 | \"program_name\": \"astro\",\n\
10 | \"relation_name\": \"cosmo$VARIABLE\",\n\
11 | \"user_name\": \"leelee\"\n\
12 | },\n\
13 | \"tipsy_filename\": \"/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00$VARIABLE\"\n\
14 | }" > "ingest_cosmo$VARIABLE.json"
15 | echo -e "curl -i -XPOST beijing.cs.washington.edu:8778/dataset/tipsy -H \"Content-type: application/json\" -d @./ingest_cosmo${VARIABLE}.json\n" >> "ingest_all_cosmo.sh"
16 | done
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/cosmo/remove.sh:
--------------------------------------------------------------------------------
1 |
2 | for VARIABLE in 024 048 072 084 096 128 144 168 192 216 226 240 264 288 312 328 336 384 406 408 432 455 456 466 480 504 512
3 | do
4 | rm "ingest_cosmo$VARIABLE.json"
5 | done
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/ingest_cosmo512.json:
--------------------------------------------------------------------------------
1 | {
2 | "grpFilename": "/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00512.amiga.grp",
3 | "iorderFilename": "/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00512.iord",
4 | "relationKey": {
5 | "programName": "astro",
6 | "relationName": "cosmo512",
7 | "userName": "leelee"
8 | },
9 | "tipsyFilename": "/projects/db8/dataset_astro_2011/cosmo50cmb.256g2MbwK.00512"
10 | }
11 |
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/ingest_cosmo512_mass.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "leelee",
4 | "programName" : "astro",
5 | "relationName" : "masstable"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["INT_TYPE", "FLOAT_TYPE"],
9 | "columnNames" : ["grp", "tot_mass"]
10 | },
11 | "source" : {
12 | "dataType" : 'File',
13 | "filename" : "/Users/dhalperi/escience/myria/data_nocommit/tipsy/cosmo512_mass.txt",
14 | },
15 | "delimiter": ","
16 | }
17 |
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/ingest_grps_of_interest.json:
--------------------------------------------------------------------------------
1 | {
2 | "relationKey" : {
3 | "userName" : "leelee",
4 | "programName" : "astro",
5 | "relationName" : "grps_of_interest"
6 | },
7 | "schema" : {
8 | "columnTypes" : ["INT_TYPE"],
9 | "columnNames" : ["grp"]
10 | },
11 | "source" : {
12 | "dataType" : 'File',
13 | "filename" : "/Users/dhalperi/escience/myria/data_nocommit/tipsy/groups_of_interest.txt"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/mass_tables/README.md:
--------------------------------------------------------------------------------
1 |
2 | To ingest the mass_tables of all the snapshots, simply run:
3 |
4 | bash ingest_all_masses.sh
5 |
6 | To ingest individual mass table:
7 |
8 | curl -i -XPOST beijing.cs.washington.edu:8777/dataset -H "Content-type: application/json" -d @./ingest512_mass.json
9 |
10 | All the JSON files are generated by running:
11 |
12 | bash generate_ingest_mass.sh.
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/mass_tables/generate_ingest_mass.sh:
--------------------------------------------------------------------------------
1 | touch "ingest_all_masses.sh"
2 | for VARIABLE in 024 048 072 084 096 128 144 168 192 216 226 240 264 288 312 328 336 384 406 408 432 455 456 466 480 504 512
3 | do
4 | touch "ingest${VARIABLE}_mass.json"
5 | echo -e "{
6 | \"relationKey\" : {
7 | \"userName\" : \"public\",
8 | \"programName\" : \"astro\",
9 | \"relationName\" : \"masstable${VARIABLE}\"
10 | },
11 | \"schema\" : {
12 | \"columnTypes\" : [\"INT_TYPE\", \"DOUBLE_TYPE\"],
13 | \"columnNames\" : [\"grp\", \"tot_mass\"]
14 | },
15 | \"source\" : {
16 | \"dataType\" : \"File\",
17 | \"filename\" : \"/projects/db8/leelee_cosmo_masses/cosmo${VARIABLE}_mass.txt\"
18 | },
19 | \"delimiter\": \",\"
20 | }" > "ingest${VARIABLE}_mass.json"
21 | echo -e "curl -i -XPOST berlin.cs.washington.edu:8753/dataset -H \"Content-type: application/json\" -d @./ingest${VARIABLE}_mass.json\n" >> "ingest_all_masses.sh"
22 | done
--------------------------------------------------------------------------------
/jsonQueries/tipsy_leelee/mass_tables/remove.sh:
--------------------------------------------------------------------------------
1 |
2 | for VARIABLE in 024 048 072 084 096 128 144 168 192 216 226 240 264 288 312 328 336 384 406 408 432 455 456 466 480 504 512
3 | do
4 | rm "ingest${VARIABLE}_mass.json"
5 | done
--------------------------------------------------------------------------------
/lib/sqlite4java-392/libsqlite4java-linux-amd64.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/libsqlite4java-linux-amd64.so
--------------------------------------------------------------------------------
/lib/sqlite4java-392/libsqlite4java-linux-i386.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/libsqlite4java-linux-i386.so
--------------------------------------------------------------------------------
/lib/sqlite4java-392/libsqlite4java-osx.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/libsqlite4java-osx.dylib
--------------------------------------------------------------------------------
/lib/sqlite4java-392/sqlite4java-win32-x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/sqlite4java-win32-x64.dll
--------------------------------------------------------------------------------
/lib/sqlite4java-392/sqlite4java-win32-x86.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/sqlite4java-win32-x86.dll
--------------------------------------------------------------------------------
/lib/sqlite4java-392/sqlite4java.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uwescience/myria/f6ee17b750a120f629c8202a0d09f594a0821e9a/lib/sqlite4java-392/sqlite4java.jar
--------------------------------------------------------------------------------
/myriadeploy/.gitignore:
--------------------------------------------------------------------------------
1 | workers.txt
2 | deployment.cfg
3 |
--------------------------------------------------------------------------------
/myriadeploy/conf:
--------------------------------------------------------------------------------
1 | ../conf
--------------------------------------------------------------------------------
/myriadeploy/launch_local_cluster:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | REPO_ROOT=$(git rev-parse --show-toplevel)
4 | if [ -n "$1" ];
5 | then
6 | cp $1 "$REPO_ROOT/myriadeploy/deployment.cfg"
7 | elif [ ! -f "$REPO_ROOT/myriadeploy/deployment.cfg" ]
8 | then
9 | cp "$REPO_ROOT/myriadeploy/deployment.cfg.local" "$REPO_ROOT/myriadeploy/deployment.cfg"
10 | fi
11 | "$JAVA_HOME/bin/java" -cp "$REPO_ROOT/build/libs/myria-0.1-all.jar" edu.washington.escience.myria.daemon.MyriaDriverLauncher -runtimeClass org.apache.reef.runtime.local.client.LocalRuntimeConfiguration -configPath "$REPO_ROOT/myriadeploy" -javaLibPath "$REPO_ROOT/build/libs" -nativeLibPath "$REPO_ROOT/lib" -pythonLibPath "$REPO_ROOT/python"
12 |
--------------------------------------------------------------------------------
/myriadeploy/libs:
--------------------------------------------------------------------------------
1 | ../build/libs
--------------------------------------------------------------------------------
/myriadeploy/sqlite4java-392:
--------------------------------------------------------------------------------
1 | ../lib/sqlite4java-392
--------------------------------------------------------------------------------
/perfenforce_files/filesToFetch.txt:
--------------------------------------------------------------------------------
1 | PSLAGeneration/PSLAManager/PSLAManager.exe
2 | PSLAGeneration/PSLAManager/Newtonsoft.Json.dll
3 | PSLAGeneration/PSLAManager/CommandLine.dll
4 | PSLAGeneration/4_Workers/results.txt
5 | PSLAGeneration/6_Workers/results.txt
6 | PSLAGeneration/8_Workers/results.txt
7 | PSLAGeneration/10_Workers/results.txt
8 | PSLAGeneration/12_Workers/results.txt
9 | PSLAGeneration/weka.jar
10 | PSLAGeneration/tiers.txt
11 | PSLAGeneration/training.arff
12 | PerfEnforceScaling/moa.jar
13 | PerfEnforceScaling/training.arff
14 | PerfEnforceScaling/features/4
15 | PerfEnforceScaling/features/6
16 | PerfEnforceScaling/features/8
17 | PerfEnforceScaling/features/10
18 | PerfEnforceScaling/features/12
--------------------------------------------------------------------------------
/protobuf/README:
--------------------------------------------------------------------------------
1 | You must install the protobuf libraries first. On Mac OS X with port:
2 | sudo port install protobuf-java
3 | sudo port install protobuf-python27 # or whatever your Python version is
4 |
5 | To compile:
6 | protoc worker_task.proto --java_out=./java --python_out=./python
7 |
8 | To run the python demo:
9 | cd python
10 | ./worker_task_example.py
11 |
--------------------------------------------------------------------------------
/protobuf/compile.sh:
--------------------------------------------------------------------------------
1 | protoc *.proto --java_out=./java --python_out=./python
2 |
--------------------------------------------------------------------------------
/protobuf/main.proto:
--------------------------------------------------------------------------------
1 | import "column.proto";
2 | import "control.proto";
3 | import "query.proto";
4 |
5 | option java_package = "edu.washington.escience.myria.proto";
6 | option java_outer_classname = "TransportProto";
7 |
8 | message TransportMessage {
9 | enum Type {
10 | DATA = 0;
11 | QUERY = 1;
12 | CONTROL = 2;
13 | }
14 |
15 | required TransportMessage.Type type = 1;
16 | optional DataMessage dataMessage = 2;
17 | optional QueryMessage queryMessage = 3;
18 | optional ControlMessage controlMessage = 4;
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/.gitignore:
--------------------------------------------------------------------------------
1 | MyriaCommit.java
2 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/accessmethod/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Access methods used for the Myria project.
3 | */
4 | package edu.washington.escience.myria.accessmethod;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/MasterResource.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api;
2 |
3 | import java.lang.management.ManagementFactory;
4 | import java.util.ArrayList;
5 | import java.util.List;
6 |
7 | import javax.ws.rs.GET;
8 | import javax.ws.rs.Path;
9 | import javax.ws.rs.Produces;
10 | import javax.ws.rs.core.Response;
11 |
12 | import edu.washington.escience.myria.api.encoding.VersionEncoding;
13 |
14 | /**
15 | * This is the class that handles API calls that return workers.
16 | *
17 | * @author jwang
18 | */
19 | @Path("/server")
20 | public final class MasterResource {
21 | /**
22 | * Get the version information of Myria at build time.
23 | *
24 | * @return a {@link VersionEncoding}.
25 | */
26 | @GET
27 | @Produces(MyriaApiConstants.JSON_UTF_8)
28 | public Response getVersion() {
29 | return Response.ok(new VersionEncoding()).build();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/MyriaApiUtils.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api;
2 |
3 | import javax.ws.rs.core.CacheControl;
4 | import javax.ws.rs.core.Response.ResponseBuilder;
5 |
6 | /**
7 | * Helper functions for the API.
8 | */
9 | public final class MyriaApiUtils {
10 | /** Utility class cannot be constructed. */
11 | private MyriaApiUtils() {}
12 |
13 | /**
14 | * Get a "do not cache" {@link CacheControl}.
15 | *
16 | * @return a {@link CacheControl} set to disable caching.
17 | */
18 | public static CacheControl doNotCache() {
19 | CacheControl noCache = new CacheControl();
20 | noCache.setNoCache(true);
21 | return noCache;
22 | }
23 |
24 | /**
25 | * Set the Cache-Control
header in the specified cache to have the no-cache
option set.
26 | *
27 | * @param response the response builder.
28 | * @return the response builder.
29 | */
30 | public static ResponseBuilder doNotCache(final ResponseBuilder response) {
31 | return response.cacheControl(doNotCache());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/AbstractProducerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 | import java.util.Set;
5 |
6 | import edu.washington.escience.myria.operator.network.Producer;
7 | import edu.washington.escience.myria.parallel.ExchangePairID;
8 |
9 | /**
10 | * @param type of the producer.
11 | */
12 | public abstract class AbstractProducerEncoding
extends UnaryOperatorEncoding
13 | implements ExchangeEncoding {
14 | private Set realWorkerIds;
15 | private List realOperatorIds;
16 |
17 | @Override
18 | public final Set getRealWorkerIds() {
19 | return realWorkerIds;
20 | }
21 |
22 | @Override
23 | public final void setRealWorkerIds(Set w) {
24 | realWorkerIds = w;
25 | }
26 |
27 | @Override
28 | public final List getRealOperatorIds() {
29 | return realOperatorIds;
30 | }
31 |
32 | @Override
33 | public final void setRealOperatorIds(List operatorIds) {
34 | realOperatorIds = operatorIds;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/AbstractQueryScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Set;
4 |
5 | import edu.washington.escience.myria.RelationKey;
6 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
7 | import edu.washington.escience.myria.operator.DbQueryScan;
8 |
9 | public abstract class AbstractQueryScanEncoding extends LeafOperatorEncoding {
10 | /** If it needs to be debroadcasted. */
11 | public boolean debroadcast;
12 |
13 | /**
14 | * @param args
15 | * @return the list of relation keys being touched.
16 | */
17 | public abstract Set sourceRelationKeys(ConstructArgs args);
18 | }
19 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/AggregateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.agg.Aggregate;
5 | import edu.washington.escience.myria.operator.agg.AggregatorFactory;
6 |
7 | /** JSON wrapper for Aggregate. */
8 | public class AggregateEncoding extends UnaryOperatorEncoding {
9 | @Required public int[] argGroupFields;
10 | @Required public AggregatorFactory[] aggregators;
11 |
12 | @Override
13 | public Aggregate construct(ConstructArgs args) {
14 | return new Aggregate(null, argGroupFields, aggregators);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/ApplyEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.expression.Expression;
7 | import edu.washington.escience.myria.operator.Apply;
8 |
9 | public class ApplyEncoding extends UnaryOperatorEncoding {
10 |
11 | @Required public List emitExpressions;
12 | public Boolean addCounter;
13 |
14 | @Override
15 | public Apply construct(final ConstructArgs args) {
16 | return new Apply(null, emitExpressions, addCounter);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/BinaryOperatorEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Map;
4 |
5 | import edu.washington.escience.myria.operator.Operator;
6 |
7 | /**
8 | * A JSON-able wrapper for the expected wire message for an operator. To add a new operator, three things need to be
9 | * done.
10 | *
11 | * 1. Create an Encoding class that extends OperatorEncoding.
12 | *
13 | * 2. Add the operator to the list of (alphabetically sorted) JsonSubTypes below.
14 | */
15 | public abstract class BinaryOperatorEncoding extends OperatorEncoding {
16 |
17 | @Required public Integer argChild1;
18 |
19 | @Required public Integer argChild2;
20 |
21 | @Override
22 | public final void connect(Operator current, Map operators) {
23 | current.setChildren(new Operator[] {operators.get(argChild1), operators.get(argChild2)});
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/BroadcastConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.Consumer;
5 | import edu.washington.escience.myria.util.MyriaUtils;
6 |
7 | /** JSON wrapper for BroadcastConsumer */
8 | public class BroadcastConsumerEncoding extends AbstractConsumerEncoding {
9 |
10 | @Override
11 | public Consumer construct(ConstructArgs args) {
12 | return new Consumer(
13 | null, MyriaUtils.getSingleElement(getRealOperatorIds()), getRealWorkerIds());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/BroadcastProducerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import com.google.common.primitives.Ints;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.network.GenericShuffleProducer;
7 | import edu.washington.escience.myria.operator.network.distribute.BroadcastDistributeFunction;
8 | import edu.washington.escience.myria.parallel.ExchangePairID;
9 |
10 | /**
11 | * JSON wrapper for BroadcastProducer
12 | */
13 | public class BroadcastProducerEncoding extends AbstractProducerEncoding {
14 |
15 | @Override
16 | public GenericShuffleProducer construct(ConstructArgs args) {
17 | GenericShuffleProducer ret =
18 | new GenericShuffleProducer(
19 | null,
20 | getRealOperatorIds().toArray(new ExchangePairID[] {}),
21 | Ints.toArray(getRealWorkerIds()),
22 | new BroadcastDistributeFunction());
23 | ret.getDistributeFunction().setDestinations(getRealWorkerIds().size(), 1);
24 | return ret;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CatalogScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.Schema;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.CatalogQueryScan;
6 |
7 | public class CatalogScanEncoding extends LeafOperatorEncoding {
8 | @Required public Schema schema;
9 | @Required public String sql;
10 |
11 | @Override
12 | public CatalogQueryScan construct(final ConstructArgs args) {
13 | return new CatalogQueryScan(sql, schema, args.getServer().getCatalog());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CollectConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.Consumer;
5 | import edu.washington.escience.myria.util.MyriaUtils;
6 |
7 | /**
8 | * JSON wrapper for CollectConsumer
9 | */
10 | public class CollectConsumerEncoding extends AbstractConsumerEncoding {
11 |
12 | @Override
13 | public Consumer construct(ConstructArgs args) {
14 | return new Consumer(
15 | null, MyriaUtils.getSingleElement(getRealOperatorIds()), getRealWorkerIds());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CollectProducerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.CollectProducer;
5 | import edu.washington.escience.myria.util.MyriaUtils;
6 |
7 | public class CollectProducerEncoding extends AbstractProducerEncoding {
8 |
9 | @Override
10 | public CollectProducer construct(ConstructArgs args) {
11 | return new CollectProducer(
12 | null,
13 | MyriaUtils.getSingleElement(getRealOperatorIds()),
14 | MyriaUtils.getSingleElement(getRealWorkerIds()));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/ConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import com.google.common.primitives.Ints;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.network.Consumer;
7 | import edu.washington.escience.myria.util.MyriaUtils;
8 |
9 | public class ConsumerEncoding extends AbstractConsumerEncoding {
10 | public int[] argWorkerIds;
11 |
12 | @Override
13 | public Consumer construct(ConstructArgs args) {
14 | return new Consumer(
15 | null, MyriaUtils.getSingleElement(getRealOperatorIds()), Ints.toArray(getRealWorkerIds()));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CountFilterStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.CountFilter;
4 |
5 | public class CountFilterStateEncoding extends StreamingStateEncoding {
6 |
7 | @Required public int threshold;
8 | @Required public int[] keyColIndices;
9 |
10 | @Override
11 | public CountFilter construct() {
12 | return new CountFilter(threshold, keyColIndices);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CounterEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.Counter;
5 |
6 | public class CounterEncoding extends UnaryOperatorEncoding {
7 |
8 | @Required public String columnName;
9 |
10 | @Override
11 | public Counter construct(ConstructArgs args) {
12 | return new Counter(columnName);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CreateFunctionEncoding.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.api.encoding;
5 |
6 | import java.util.Set;
7 |
8 | import edu.washington.escience.myria.MyriaConstants.FunctionLanguage;
9 |
10 | /**
11 | *
12 | */
13 | public class CreateFunctionEncoding extends MyriaApiEncoding {
14 | @Required public String name;
15 | @Required public String outputType;
16 | @Required public FunctionLanguage lang;
17 | @Required public Boolean isMultiValued;
18 | public String description;
19 | public String binary;
20 | public Set workers;
21 | }
22 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CreateIndexEncoding.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.api.encoding;
5 |
6 | import java.util.List;
7 |
8 | import edu.washington.escience.myria.RelationKey;
9 | import edu.washington.escience.myria.accessmethod.AccessMethod.IndexRef;
10 |
11 | /**
12 | *
13 | */
14 | public class CreateIndexEncoding extends MyriaApiEncoding {
15 | @Required public RelationKey relationKey;
16 | @Required public List indexes;
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CreateViewEncoding.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.api.encoding;
5 |
6 | import java.util.Set;
7 |
8 | /**
9 | *
10 | */
11 | public class CreateViewEncoding extends MyriaApiEncoding {
12 | @Required public String viewName;
13 | @Required public String viewDefinition;
14 | public Set workers;
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/CrossWithSingletonEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.MyriaApiException;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.CrossWithSingleton;
6 |
7 | public class CrossWithSingletonEncoding extends BinaryOperatorEncoding {
8 |
9 | @Override
10 | public CrossWithSingleton construct(ConstructArgs args) throws MyriaApiException {
11 | return new CrossWithSingleton(null, null);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/DatasetEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.RelationKey;
6 | import edu.washington.escience.myria.Schema;
7 | import edu.washington.escience.myria.accessmethod.AccessMethod.IndexRef;
8 | import edu.washington.escience.myria.io.DataSource;
9 | import edu.washington.escience.myria.operator.network.distribute.DistributeFunction;
10 | import edu.washington.escience.myria.operator.network.distribute.RoundRobinDistributeFunction;
11 |
12 | public class DatasetEncoding extends MyriaApiEncoding {
13 | @Required public RelationKey relationKey;
14 | @Required public Schema schema;
15 | public List workers;
16 | @Required public DataSource source;
17 | public Character delimiter;
18 | public Character escape;
19 | public Integer numberOfSkippedLines;
20 | public Character quote;
21 | public Boolean importFromDatabase;
22 | public List> indexes;
23 | public Boolean overwrite;
24 | public DistributeFunction distributeFunction = new RoundRobinDistributeFunction();
25 | }
26 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/DifferenceEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.MyriaApiException;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.Difference;
6 |
7 | public class DifferenceEncoding extends BinaryOperatorEncoding {
8 |
9 | @Override
10 | public Difference construct(ConstructArgs args) throws MyriaApiException {
11 | return new Difference(null, null);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/DupElimEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.MyriaApiException;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.DupElim;
6 |
7 | public class DupElimEncoding extends UnaryOperatorEncoding {
8 |
9 | @Override
10 | public DupElim construct(ConstructArgs args) throws MyriaApiException {
11 | return new DupElim(null);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/DupElimStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.StatefulDupElim;
4 |
5 | public class DupElimStateEncoding extends StreamingStateEncoding {
6 |
7 | @Override
8 | public StatefulDupElim construct() {
9 | return new StatefulDupElim();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/EOSControllerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import com.google.common.primitives.Ints;
6 |
7 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
8 | import edu.washington.escience.myria.operator.network.EOSController;
9 | import edu.washington.escience.myria.parallel.ExchangePairID;
10 |
11 | public class EOSControllerEncoding extends AbstractProducerEncoding {
12 |
13 | @Override
14 | public EOSController construct(ConstructArgs args) {
15 | List ids = getRealOperatorIds();
16 | return new EOSController(
17 | null, ids.toArray(new ExchangePairID[ids.size()]), Ints.toArray(getRealWorkerIds()));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/EmptyRelationEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.Schema;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.EmptyRelation;
6 |
7 | public class EmptyRelationEncoding extends LeafOperatorEncoding {
8 | @Required public Schema schema;
9 |
10 | @Override
11 | public EmptyRelation construct(ConstructArgs args) {
12 | return EmptyRelation.of(schema);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/EmptySinkEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.EmptySink;
5 |
6 | public class EmptySinkEncoding extends UnaryOperatorEncoding {
7 |
8 | public Integer argLimit;
9 |
10 | @Override
11 | public EmptySink construct(final ConstructArgs args) {
12 | if (argLimit != null) {
13 | return new EmptySink(null, argLimit);
14 | } else {
15 | return new EmptySink(null);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/ExchangeEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 | import java.util.Set;
5 |
6 | import edu.washington.escience.myria.parallel.ExchangePairID;
7 |
8 | public interface ExchangeEncoding {
9 |
10 | Set getRealWorkerIds();
11 |
12 | void setRealWorkerIds(Set w);
13 |
14 | List getRealOperatorIds();
15 |
16 | void setRealOperatorIds(List operatorIds);
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/FileScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.Schema;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.io.DataSource;
6 | import edu.washington.escience.myria.operator.FileScan;
7 |
8 | public class FileScanEncoding extends LeafOperatorEncoding {
9 | @Required public Schema schema;
10 | @Required public DataSource source;
11 | public Character delimiter;
12 | public Character quote;
13 | public Character escape;
14 | public Integer skip;
15 |
16 | @Override
17 | public FileScan construct(ConstructArgs args) {
18 | return new FileScan(source, schema, delimiter, quote, escape, skip);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/FilterEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.expression.Expression;
5 | import edu.washington.escience.myria.operator.Filter;
6 |
7 | public class FilterEncoding extends UnaryOperatorEncoding {
8 |
9 | @Required public Expression argPredicate;
10 |
11 | @Override
12 | public Filter construct(ConstructArgs args) {
13 | return new Filter(argPredicate, null);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/GenericShuffleConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.Consumer;
5 | import edu.washington.escience.myria.util.MyriaUtils;
6 |
7 | /** JSON wrapper for GenericShuffleConsumer. */
8 | public class GenericShuffleConsumerEncoding extends AbstractConsumerEncoding {
9 |
10 | @Override
11 | public Consumer construct(ConstructArgs args) {
12 | return new Consumer(
13 | null, MyriaUtils.getSingleElement(getRealOperatorIds()), getRealWorkerIds());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/HyperCubeShuffleConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.Consumer;
5 | import edu.washington.escience.myria.util.MyriaUtils;
6 |
7 | /**
8 | * Consumer part of JSON encoding for HyperCube Join.
9 | */
10 | public class HyperCubeShuffleConsumerEncoding extends AbstractConsumerEncoding {
11 |
12 | @Override
13 | public Consumer construct(ConstructArgs args) {
14 | return new Consumer(
15 | null, MyriaUtils.getSingleElement(getRealOperatorIds()), getRealWorkerIds());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/InMemoryOrderByEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import javax.ws.rs.core.Response.Status;
4 |
5 | import edu.washington.escience.myria.api.MyriaApiException;
6 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
7 | import edu.washington.escience.myria.operator.InMemoryOrderBy;
8 |
9 | public class InMemoryOrderByEncoding extends UnaryOperatorEncoding {
10 |
11 | @Required public int[] argSortColumns;
12 | @Required public boolean[] argAscending;
13 |
14 | @Override
15 | public InMemoryOrderBy construct(final ConstructArgs args) throws MyriaApiException {
16 | return new InMemoryOrderBy(null, argSortColumns, argAscending);
17 | }
18 |
19 | @Override
20 | protected void validateExtra() {
21 | if (argSortColumns.length != argAscending.length) {
22 | throw new MyriaApiException(
23 | Status.BAD_REQUEST, "sort columns number should be equal to ascending orders number!");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/KeepAndSortOnMinValueStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.KeepAndSortOnMinValue;
4 |
5 | public class KeepAndSortOnMinValueStateEncoding
6 | extends StreamingStateEncoding {
7 |
8 | public int[] keyColIndices;
9 | public int[] valueColIndices;
10 |
11 | @Override
12 | public KeepAndSortOnMinValue construct() {
13 | return new KeepAndSortOnMinValue(keyColIndices, valueColIndices);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/KeepMinValueStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.KeepMinValue;
4 |
5 | public class KeepMinValueStateEncoding extends StreamingStateEncoding {
6 |
7 | public int[] keyColIndices;
8 | public int[] valueColIndices;
9 |
10 | @Override
11 | public KeepMinValue construct() {
12 | return new KeepMinValue(keyColIndices, valueColIndices);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/LeafOperatorEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Map;
4 |
5 | import edu.washington.escience.myria.operator.Operator;
6 |
7 | /**
8 | * A JSON-able wrapper for the expected wire message for an operator. To add a new operator, three things need to be
9 | * done.
10 | *
11 | * 1. Create an Encoding class that extends OperatorEncoding.
12 | *
13 | * 2. Add the operator to the list of (alphabetically sorted) JsonSubTypes below.
14 | */
15 | public abstract class LeafOperatorEncoding extends OperatorEncoding {
16 |
17 | @Override
18 | public final void connect(Operator current, Map operators) {}
19 | }
20 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/LeapFrogJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.MyriaApiException;
6 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
7 | import edu.washington.escience.myria.operator.LeapFrogJoin;
8 |
9 | public class LeapFrogJoinEncoding extends NaryOperatorEncoding {
10 |
11 | public List argColumnNames;
12 | public boolean[] indexOnFirst;
13 | @Required public int[][][] joinFieldMapping;
14 | @Required public int[][] outputFieldMapping;
15 |
16 | @Override
17 | public LeapFrogJoin construct(ConstructArgs args) throws MyriaApiException {
18 | return new LeapFrogJoin(
19 | null, joinFieldMapping, outputFieldMapping, argColumnNames, indexOnFirst);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/LimitEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.Limit;
5 |
6 | public class LimitEncoding extends UnaryOperatorEncoding {
7 |
8 | @Required public Long numTuples;
9 |
10 | @Override
11 | public Limit construct(ConstructArgs args) {
12 | return new Limit(numTuples, null);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/LocalMultiwayConsumerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import com.google.common.collect.ImmutableSet;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.network.Consumer;
7 | import edu.washington.escience.myria.parallel.ipc.IPCConnectionPool;
8 | import edu.washington.escience.myria.util.MyriaUtils;
9 |
10 | /** A JSON-able wrapper for the expected wire message for a new dataset. */
11 | public class LocalMultiwayConsumerEncoding extends AbstractConsumerEncoding {
12 |
13 | @Override
14 | public Consumer construct(ConstructArgs args) {
15 | return new Consumer(
16 | null,
17 | MyriaUtils.getSingleElement(getRealOperatorIds()),
18 | ImmutableSet.of(IPCConnectionPool.SELF_IPC_ID));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/LocalMultiwayProducerEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.network.LocalMultiwayProducer;
5 | import edu.washington.escience.myria.parallel.ExchangePairID;
6 |
7 | /** JSON wrapper for LocalMultiwayProducer. */
8 | public class LocalMultiwayProducerEncoding extends AbstractProducerEncoding {
9 |
10 | @Override
11 | public LocalMultiwayProducer construct(ConstructArgs args) {
12 | return new LocalMultiwayProducer(null, getRealOperatorIds().toArray(new ExchangePairID[] {}));
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/MergeEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.Merge;
5 |
6 | public class MergeEncoding extends NaryOperatorEncoding {
7 |
8 | @Override
9 | public Merge construct(ConstructArgs args) {
10 | return new Merge(null, null, null);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/MergeJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.MergeJoin;
7 |
8 | public class MergeJoinEncoding extends BinaryOperatorEncoding {
9 | public List argColumnNames;
10 | @Required public int[] argColumns1;
11 | @Required public int[] argColumns2;
12 | @Required public int[] argSelect1;
13 | @Required public int[] argSelect2;
14 | @Required public boolean[] acending;
15 |
16 | @Override
17 | public MergeJoin construct(ConstructArgs args) {
18 | return new MergeJoin(
19 | argColumnNames, null, null, argColumns1, argColumns2, argSelect1, argSelect2, acending);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/NChiladaFileScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.MyriaApiException;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.operator.NChiladaFileScan;
6 |
7 | public class NChiladaFileScanEncoding extends LeafOperatorEncoding {
8 |
9 | @Required public String nchiladaDirectoryName;
10 | @Required public String groupFileName;
11 |
12 | @Override
13 | public NChiladaFileScan construct(ConstructArgs args) throws MyriaApiException {
14 | return new NChiladaFileScan(nchiladaDirectoryName, groupFileName);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/NaryOperatorEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Map;
4 |
5 | import edu.washington.escience.myria.operator.Operator;
6 |
7 | /**
8 | * A JSON-able wrapper for the expected wire message for an operator. To add a new operator, three things need to be
9 | * done.
10 | *
11 | * 1. Create an Encoding class that extends OperatorEncoding.
12 | *
13 | * 2. Add the operator to the list of (alphabetically sorted) JsonSubTypes below.
14 | */
15 | public abstract class NaryOperatorEncoding extends OperatorEncoding {
16 |
17 | @Required public Integer[] argChildren;
18 |
19 | @Override
20 | public final void connect(final Operator current, final Map operators) {
21 | Operator[] tmp = new Operator[argChildren.length];
22 | for (int i = 0; i < tmp.length; ++i) {
23 | tmp[i] = operators.get(argChildren[i]);
24 | }
25 | current.setChildren(tmp);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/ParallelDatasetEncoding.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.api.encoding;
5 |
6 | import java.util.Set;
7 |
8 | import edu.washington.escience.myria.RelationKey;
9 | import edu.washington.escience.myria.Schema;
10 | import edu.washington.escience.myria.io.AmazonS3Source;
11 | import edu.washington.escience.myria.operator.network.distribute.DistributeFunction;
12 | import edu.washington.escience.myria.operator.network.distribute.RoundRobinDistributeFunction;
13 |
14 | /**
15 | *
16 | */
17 | public class ParallelDatasetEncoding extends MyriaApiEncoding {
18 | @Required public RelationKey relationKey;
19 | @Required public Schema schema;
20 | @Required public AmazonS3Source s3Source;
21 | public Character delimiter;
22 | public Character escape;
23 | public Integer numberOfSkippedLines;
24 | public Character quote;
25 | public Set workers;
26 | public DistributeFunction distributeFunction = new RoundRobinDistributeFunction();
27 | }
28 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/QueryScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Set;
4 |
5 | import edu.washington.escience.myria.RelationKey;
6 | import edu.washington.escience.myria.Schema;
7 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
8 | import edu.washington.escience.myria.operator.DbQueryScan;
9 |
10 | public class QueryScanEncoding extends AbstractQueryScanEncoding {
11 | @Required public Schema schema;
12 | @Required public String sql;
13 | @Required public Set sourceRelationKeys;
14 |
15 | public Set sourceRelationKeys(ConstructArgs args) {
16 | return sourceRelationKeys;
17 | }
18 |
19 | @Override
20 | public DbQueryScan construct(ConstructArgs args) {
21 | return new DbQueryScan(sql, schema);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/QuerySearchResults.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import com.fasterxml.jackson.annotation.JsonProperty;
6 |
7 | /**
8 | * Encodes the REST response when the user searches queries.
9 | */
10 | public class QuerySearchResults {
11 | /* The maximum query id that matches the search. */
12 | @JsonProperty public long max;
13 | /* The minimum query id that matches the search. */
14 | @JsonProperty public long min;
15 | /* The actual search results. */
16 | @JsonProperty public List results;
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/Required.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * Annotation for describing a field is required in the JSON Query/Dataset encoding.
4 | *
5 | * @author slxu
6 | */
7 | package edu.washington.escience.myria.api.encoding;
8 |
9 | import java.lang.annotation.ElementType;
10 | import java.lang.annotation.Retention;
11 | import java.lang.annotation.RetentionPolicy;
12 | import java.lang.annotation.Target;
13 |
14 | @Retention(RetentionPolicy.RUNTIME)
15 | @Target(ElementType.FIELD)
16 | public @interface Required {}
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/RightHashCountingJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.RightHashCountingJoin;
5 |
6 | /**
7 | *
8 | * Encoding for {@link RightHashCountingJoin}.
9 | *
10 | */
11 | public class RightHashCountingJoinEncoding extends BinaryOperatorEncoding {
12 | @Required public int[] argColumns1;
13 | @Required public int[] argColumns2;
14 |
15 | @Override
16 | public RightHashCountingJoin construct(ConstructArgs args) {
17 | return new RightHashCountingJoin(null, null, argColumns1, argColumns2);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/RightHashJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.RightHashJoin;
7 |
8 | /**
9 | *
10 | * Encoding for {@link RightHashJoin}.
11 | *
12 | */
13 | public class RightHashJoinEncoding extends BinaryOperatorEncoding {
14 | public List argColumnNames;
15 | @Required public int[] argColumns1;
16 | @Required public int[] argColumns2;
17 | @Required public int[] argSelect1;
18 | @Required public int[] argSelect2;
19 |
20 | @Override
21 | public RightHashJoin construct(ConstructArgs args) {
22 | return new RightHashJoin(
23 | argColumnNames, null, null, argColumns1, argColumns2, argSelect1, argSelect2);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SampleEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.Sample;
5 |
6 | public class SampleEncoding extends BinaryOperatorEncoding {
7 |
8 | /** Used to make results deterministic. Null if no specified value. */
9 | public Long randomSeed;
10 |
11 | @Override
12 | public Sample construct(final ConstructArgs args) {
13 | return new Sample(null, null, randomSeed);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SeaFlowFileScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.io.DataSource;
5 | import edu.washington.escience.myria.operator.SeaFlowFileScan;
6 |
7 | public class SeaFlowFileScanEncoding extends LeafOperatorEncoding {
8 | @Required public DataSource source;
9 |
10 | @Override
11 | public SeaFlowFileScan construct(ConstructArgs args) {
12 | return new SeaFlowFileScan(source);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SetGlobalEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.SetGlobal;
5 |
6 | public class SetGlobalEncoding extends UnaryOperatorEncoding {
7 |
8 | @Required public String key;
9 |
10 | @Override
11 | public SetGlobal construct(ConstructArgs args) {
12 | return new SetGlobal(null, key, args.getServer());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SimpleAppenderStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.SimpleAppender;
4 |
5 | public class SimpleAppenderStateEncoding extends StreamingStateEncoding {
6 |
7 | @Override
8 | public SimpleAppender construct() {
9 | return new SimpleAppender();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SingletonEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.SingletonRelation;
5 |
6 | public class SingletonEncoding extends LeafOperatorEncoding {
7 | @Override
8 | public SingletonRelation construct(ConstructArgs args) {
9 | return new SingletonRelation();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/StatefulApplyEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.expression.Expression;
7 | import edu.washington.escience.myria.operator.Apply;
8 | import edu.washington.escience.myria.operator.StatefulApply;
9 |
10 | public class StatefulApplyEncoding extends UnaryOperatorEncoding {
11 |
12 | @Required public List emitExpressions;
13 | @Required public List initializerExpressions;
14 | @Required public List updaterExpressions;
15 |
16 | @Override
17 | public Apply construct(ConstructArgs args) {
18 | return new StatefulApply(null, emitExpressions, initializerExpressions, updaterExpressions);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/StreamingStateEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import com.fasterxml.jackson.annotation.JsonSubTypes;
4 | import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
5 | import com.fasterxml.jackson.annotation.JsonTypeInfo;
6 |
7 | import edu.washington.escience.myria.operator.StreamingState;
8 |
9 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
10 | @JsonSubTypes({
11 | @Type(value = DupElimStateEncoding.class, name = "DupElim"),
12 | @Type(value = KeepMinValueStateEncoding.class, name = "KeepMinValue"),
13 | @Type(value = KeepAndSortOnMinValueStateEncoding.class, name = "KeepAndSortOnMinValue"),
14 | @Type(value = CountFilterStateEncoding.class, name = "CountFilter"),
15 | @Type(value = SimpleAppenderStateEncoding.class, name = "SimpleAppender")
16 | })
17 | public abstract class StreamingStateEncoding extends MyriaApiEncoding {
18 | /**
19 | * @return the instantiated StreamingState.
20 | */
21 | public abstract T construct();
22 | }
23 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SymmetricHashCountingJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.SymmetricHashCountingJoin;
5 |
6 | public class SymmetricHashCountingJoinEncoding
7 | extends BinaryOperatorEncoding {
8 |
9 | @Required public int[] argColumns1;
10 | @Required public int[] argColumns2;
11 |
12 | @Override
13 | public SymmetricHashCountingJoin construct(ConstructArgs args) {
14 | return new SymmetricHashCountingJoin(null, null, argColumns1, argColumns2);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/SymmetricHashJoinEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.operator.SymmetricHashJoin;
7 | import edu.washington.escience.myria.operator.SymmetricHashJoin.JoinPullOrder;
8 |
9 | public class SymmetricHashJoinEncoding extends BinaryOperatorEncoding {
10 |
11 | @Required public int[] argColumns1;
12 | @Required public int[] argColumns2;
13 | @Required public int[] argSelect1;
14 | @Required public int[] argSelect2;
15 | public List argColumnNames;
16 | public boolean argSetSemanticsLeft = false;
17 | public boolean argSetSemanticsRight = false;
18 | public JoinPullOrder argOrder = JoinPullOrder.ALTERNATE;
19 |
20 | @Override
21 | public SymmetricHashJoin construct(final ConstructArgs args) {
22 | return new SymmetricHashJoin(
23 | null,
24 | null,
25 | argColumns1,
26 | argColumns2,
27 | argSelect1,
28 | argSelect2,
29 | argSetSemanticsLeft,
30 | argSetSemanticsRight,
31 | argColumnNames,
32 | argOrder);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/TipsyFileScanEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.TipsyFileScan;
5 |
6 | public class TipsyFileScanEncoding extends LeafOperatorEncoding {
7 | @Required public String tipsyFilename;
8 | @Required public String grpFilename;
9 | @Required public String iorderFilename;
10 |
11 | @Override
12 | public TipsyFileScan construct(ConstructArgs args) {
13 | return new TipsyFileScan(tipsyFilename, iorderFilename, grpFilename);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/TupleSinkEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.operator.TupleSink;
4 | import edu.washington.escience.myria.TupleWriter;
5 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
6 | import edu.washington.escience.myria.io.DataSink;
7 |
8 | public class TupleSinkEncoding extends UnaryOperatorEncoding {
9 | @Required public TupleWriter tupleWriter;
10 | @Required public DataSink dataSink;
11 |
12 | @Override
13 | public TupleSink construct(ConstructArgs args) {
14 | return new TupleSink(null, tupleWriter, dataSink);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/TupleSourceEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.TupleReader;
4 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
5 | import edu.washington.escience.myria.io.DataSource;
6 | import edu.washington.escience.myria.operator.TupleSource;
7 |
8 | public class TupleSourceEncoding extends LeafOperatorEncoding {
9 | @Required public TupleReader reader;
10 | @Required public DataSource source;
11 |
12 | @Override
13 | public TupleSource construct(final ConstructArgs args) {
14 | return new TupleSource(reader, source);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/UnaryOperatorEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import java.util.Map;
4 |
5 | import edu.washington.escience.myria.operator.Operator;
6 |
7 | /**
8 | * A JSON-able wrapper for the expected wire message for an operator. To add a new operator, three things need to be
9 | * done.
10 | *
11 | * 1. Create an Encoding class that extends OperatorEncoding.
12 | *
13 | * 2. Add the operator to the list of (alphabetically sorted) JsonSubTypes below.
14 | */
15 | public abstract class UnaryOperatorEncoding extends OperatorEncoding {
16 |
17 | @Required public Integer argChild;
18 |
19 | @Override
20 | public final void connect(Operator current, Map operators) {
21 | current.setChildren(new Operator[] {operators.get(argChild)});
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/UnionAllEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.api.encoding.QueryConstruct.ConstructArgs;
4 | import edu.washington.escience.myria.operator.UnionAll;
5 |
6 | public class UnionAllEncoding extends NaryOperatorEncoding {
7 |
8 | @Override
9 | public UnionAll construct(ConstructArgs args) {
10 | return new UnionAll(null);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/VersionEncoding.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.api.encoding;
2 |
3 | import edu.washington.escience.myria.MyriaCommit;
4 |
5 | /**
6 | * Version info about the source code at build time.
7 | */
8 | public class VersionEncoding {
9 | /** The git commit id at build time. */
10 | public final String commit = MyriaCommit.COMMIT;
11 | /** The git branch at build time. */
12 | public final String branch = MyriaCommit.BRANCH;
13 | }
14 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | package edu.washington.escience.myria.api.encoding;
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/encoding/plan/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Encodings for {@link edu.washington.escience.myria.parallel.QueryPlan} operators
3 | */
4 | package edu.washington.escience.myria.api.encoding.plan;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/api/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * REST interface.
3 | *
4 | *
5 | */
6 | package edu.washington.escience.myria.api;
7 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/cmd/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * For command-line programs.
3 | */
4 | /**
5 | *
6 | */
7 | package edu.washington.escience.myria.cmd;
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/IntArrayColumn.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.column;
2 |
3 | import com.google.common.base.Preconditions;
4 |
5 | /**
6 | * A column of Int values.
7 | *
8 | *
9 | */
10 | public final class IntArrayColumn extends IntColumn {
11 | /**
12 | *
13 | */
14 | private static final long serialVersionUID = 1L;
15 | /** Internal representation of the column data. */
16 | private final int[] data;
17 | /** The number of existing rows in this column. */
18 | private final int position;
19 |
20 | /**
21 | * Constructs a new column.
22 | *
23 | * @param data the data
24 | * @param numData number of tuples.
25 | * */
26 | public IntArrayColumn(final int[] data, final int numData) {
27 | this.data = data;
28 | position = numData;
29 | }
30 |
31 | @Override
32 | public Integer getObject(final int row) {
33 | return Integer.valueOf(getInt(row));
34 | }
35 |
36 | @Override
37 | public int getInt(final int row) {
38 | Preconditions.checkElementIndex(row, position);
39 | return data[row];
40 | }
41 |
42 | @Override
43 | public int size() {
44 | return position;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/IntColumn.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.column;
2 |
3 | import edu.washington.escience.myria.Type;
4 |
5 | /**
6 | * An abstract Column with a primitive type accessor.
7 | *
8 | *
9 | */
10 | public abstract class IntColumn extends Column {
11 | /** Required for Java serialization. */
12 | private static final long serialVersionUID = 1L;
13 |
14 | /**
15 | * Returns the element at the specified row in this column.
16 | *
17 | * @param row row of element to return.
18 | * @return the element at the specified row in this column.
19 | */
20 | @Override
21 | public abstract int getInt(final int row);
22 |
23 | @Override
24 | public final Type getType() {
25 | return Type.INT_TYPE;
26 | }
27 |
28 | @Override
29 | public final String toString() {
30 | final StringBuilder sb = new StringBuilder();
31 | sb.append(size()).append(" elements: [");
32 | for (int i = 0; i < size(); ++i) {
33 | if (i > 0) {
34 | sb.append(", ");
35 | }
36 | sb.append(getInt(i));
37 | }
38 | sb.append(']');
39 | return sb.toString();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/StringColumn.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.column;
2 |
3 | import edu.washington.escience.myria.Type;
4 |
5 | /**
6 | * An abstract column of String values.
7 | *
8 | */
9 | public abstract class StringColumn extends Column {
10 | /** Required for Java serialization. */
11 | private static final long serialVersionUID = 1L;
12 |
13 | @Override
14 | public final String getObject(final int row) {
15 | return getString(row);
16 | }
17 |
18 | @Override
19 | public abstract String getString(final int row);
20 |
21 | @Override
22 | public final Type getType() {
23 | return Type.STRING_TYPE;
24 | }
25 |
26 | @Override
27 | public final String toString() {
28 | final StringBuilder sb = new StringBuilder();
29 | sb.append(size()).append(" elements: [");
30 | for (int i = 0; i < size(); ++i) {
31 | if (i > 0) {
32 | sb.append(", ");
33 | }
34 | sb.append(getString(i));
35 | }
36 | sb.append(']');
37 | return sb.toString();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/builder/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interfaces and implementations of Columns for the Myria project.
3 | */
4 | package edu.washington.escience.myria.column.builder;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/mutable/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interfaces and implementations of MutableColumns for the Myria project.
3 | */
4 | package edu.washington.escience.myria.column.mutable;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/column/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * In memory column data structures.
3 | */
4 | package edu.washington.escience.myria.column;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/coordinator/ConfigFileException.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.coordinator;
2 |
3 | /**
4 | *
5 | */
6 | public class ConfigFileException extends Exception {
7 |
8 | /** */
9 | private static final long serialVersionUID = 1L;
10 |
11 | /**
12 | * @param cause the cause (which is saved for later by the Throwable.getCause() method).
13 | */
14 | public ConfigFileException(final Throwable cause) {
15 | super(cause);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/coordinator/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | package edu.washington.escience.myria.coordinator;
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/daemon/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.daemon;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/AbsExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the absolute value of the operand.
8 | */
9 | public class AbsExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private AbsExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the absolute value of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public AbsExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | return checkAndReturnDefaultNumericType(parameters);
33 | }
34 |
35 | @Override
36 | public String getJavaString(final ExpressionOperatorParameter parameters) {
37 | return getFunctionCallUnaryString("Math.abs", parameters);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/AndExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Boolean and in an expression tree.
8 | */
9 | public class AndExpression extends BinaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private AndExpression() {}
18 |
19 | /**
20 | * True if left and right are true.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public AndExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right);
27 | }
28 |
29 | @Override
30 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
31 | checkBooleanType(parameters);
32 | return Type.BOOLEAN_TYPE;
33 | }
34 |
35 | @Override
36 | public String getJavaString(final ExpressionOperatorParameter parameters) {
37 | return getInfixBinaryString("&&", parameters);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/CeilExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the {@link Math.ceil} of the operand.
8 | */
9 | public class CeilExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private CeilExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the {@link Math.ceil} of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public CeilExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.ceil", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/CosExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the {@link Math.cos} of the operand.
8 | */
9 | public class CosExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private CosExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the {@link Math.cos} of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public CosExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.cos", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/EqualsExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for equality in expression tree.
7 | */
8 | public class EqualsExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private EqualsExpression() {
16 | super(SimplePredicate.Op.EQUALS);
17 | }
18 |
19 | /**
20 | * True if left == right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public EqualsExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.EQUALS);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/Expressions.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.operator.Operator;
4 |
5 | /**
6 | * Utilities to create Expressions.
7 | */
8 | public final class Expressions {
9 | /** Utility class cannot be constructed. */
10 | private Expressions() {}
11 |
12 | /**
13 | * Construct an expression to select the specified column from the child.
14 | *
15 | * @param child the child operator
16 | * @param column the column to be selected
17 | * @return an expression to select the specified column from the child
18 | */
19 | public static Expression columnSelect(final Operator child, final int column) {
20 | ExpressionOperator op = new VariableExpression(column);
21 | return new Expression(child.getSchema().getColumnName(column), op);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/FloorExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the {@link Math.floor} of the operand.
8 | */
9 | public class FloorExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private FloorExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the {@link Math.floor} of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public FloorExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.floor", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/GreaterExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | *
8 | */
9 | public class GreaterExpression extends BinaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private GreaterExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Gets the maximum value of two numbers.
23 | *
24 | * @param left the left operand.
25 | * @param right the right operand.
26 | */
27 | public GreaterExpression(final ExpressionOperator left, final ExpressionOperator right) {
28 | super(left, right);
29 | }
30 |
31 | @Override
32 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
33 | return checkAndReturnDefaultNumericType(parameters);
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallBinaryString("Math.max", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/GreaterThanExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for greater than in expression tree.
7 | */
8 | public class GreaterThanExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private GreaterThanExpression() {
16 | super(SimplePredicate.Op.GREATER_THAN);
17 | }
18 |
19 | /**
20 | * True if left > right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public GreaterThanExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.GREATER_THAN);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/GreaterThanOrEqualsExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for greater than or equals in expression tree.
7 | */
8 | public class GreaterThanOrEqualsExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used used automagically by Jackson deserialization.
14 | */
15 | private GreaterThanOrEqualsExpression() {
16 | super(SimplePredicate.Op.GREATER_THAN_OR_EQ);
17 | }
18 |
19 | /**
20 | * True if left >= right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public GreaterThanOrEqualsExpression(
26 | final ExpressionOperator left, final ExpressionOperator right) {
27 | super(left, right, SimplePredicate.Op.GREATER_THAN_OR_EQ);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/LessThanExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for less than in expression tree.
7 | */
8 | public class LessThanExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private LessThanExpression() {
16 | super(SimplePredicate.Op.LESS_THAN);
17 | }
18 |
19 | /**
20 | * True if left < right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public LessThanExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.LESS_THAN);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/LessThanOrEqualsExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for less than or equals in expression tree.
7 | */
8 | public class LessThanOrEqualsExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private LessThanOrEqualsExpression() {
16 | super(SimplePredicate.Op.LESS_THAN_OR_EQ);
17 | }
18 |
19 | /**
20 | * True if left <= right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public LessThanOrEqualsExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.LESS_THAN_OR_EQ);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/LesserExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | *
8 | */
9 | public class LesserExpression extends BinaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private LesserExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Gets the minimum value of two numbers.
23 | *
24 | * @param left the left operand.
25 | * @param right the right operand.
26 | */
27 | public LesserExpression(final ExpressionOperator left, final ExpressionOperator right) {
28 | super(left, right);
29 | }
30 |
31 | @Override
32 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
33 | return checkAndReturnDefaultNumericType(parameters);
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallBinaryString("Math.min", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/LikeExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * The SQL LIKE Expression.
7 | */
8 | public class LikeExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private LikeExpression() {
16 | super(SimplePredicate.Op.LIKE);
17 | }
18 |
19 | /**
20 | * True if left LIKE right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public LikeExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.LIKE);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/LogExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the natural logarithm (base e) of the operand.
8 | */
9 | public class LogExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private LogExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the natural logarithm (base e) of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public LogExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.log", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/NegateExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Negate (Unary minus) the operand.
8 | */
9 | public class NegateExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private NegateExpression() {}
18 |
19 | /**
20 | * Negate (unary minus) the operand.
21 | *
22 | * @param operand the operand.
23 | */
24 | public NegateExpression(final ExpressionOperator operand) {
25 | super(operand);
26 | }
27 |
28 | @Override
29 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
30 | return checkAndReturnDefaultNumericType(parameters);
31 | }
32 |
33 | @Override
34 | public String getJavaString(final ExpressionOperatorParameter parameters) {
35 | return getFunctionCallUnaryString("-", parameters);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/NotEqualsExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.SimplePredicate;
4 |
5 | /**
6 | * Comparison for not equality in expression tree.
7 | */
8 | public class NotEqualsExpression extends ComparisonExpression {
9 | /***/
10 | private static final long serialVersionUID = 1L;
11 |
12 | /**
13 | * This is used automagically by Jackson deserialization.
14 | */
15 | private NotEqualsExpression() {
16 | super(SimplePredicate.Op.NOT_EQUALS);
17 | }
18 |
19 | /**
20 | * True if left != right.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public NotEqualsExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right, SimplePredicate.Op.NOT_EQUALS);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/NotExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Negate (boolean not) the operand.
8 | */
9 | public class NotExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private NotExpression() {}
18 |
19 | /**
20 | * Negate (boolean not) the operand.
21 | *
22 | * @param operand the operand.
23 | */
24 | public NotExpression(final ExpressionOperator operand) {
25 | super(operand);
26 | }
27 |
28 | @Override
29 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
30 | checkBooleanType(parameters);
31 | return Type.BOOLEAN_TYPE;
32 | }
33 |
34 | @Override
35 | public String getJavaString(final ExpressionOperatorParameter parameters) {
36 | return getFunctionCallUnaryString("!", parameters);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/OrExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Boolean or in an expression tree.
8 | */
9 | public class OrExpression extends BinaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private OrExpression() {}
18 |
19 | /**
20 | * True if left or right is true.
21 | *
22 | * @param left the left operand.
23 | * @param right the right operand.
24 | */
25 | public OrExpression(final ExpressionOperator left, final ExpressionOperator right) {
26 | super(left, right);
27 | }
28 |
29 | @Override
30 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
31 | checkBooleanType(parameters);
32 | return Type.BOOLEAN_TYPE;
33 | }
34 |
35 | @Override
36 | public String getJavaString(final ExpressionOperatorParameter parameters) {
37 | return getInfixBinaryString("||", parameters);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/RandomExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import java.util.Objects;
4 |
5 | import edu.washington.escience.myria.Type;
6 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
7 |
8 | /**
9 | * Expression operator that returns a random double greater than or equal to 0.0 and less than 1.0.
10 | */
11 | public class RandomExpression extends ZeroaryExpression {
12 | /***/
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | * Default constructor.
17 | */
18 | public RandomExpression() {}
19 |
20 | @Override
21 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
22 | return Type.DOUBLE_TYPE;
23 | }
24 |
25 | @Override
26 | public String getJavaString(final ExpressionOperatorParameter parameters) {
27 | return "Math.random()";
28 | }
29 |
30 | @Override
31 | public int hashCode() {
32 | return Objects.hash(getClass().getCanonicalName());
33 | }
34 |
35 | @Override
36 | public boolean equals(final Object other) {
37 | return other != null && other instanceof RandomExpression;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/SinExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the {@link Math.sin} of the operand.
8 | */
9 | public class SinExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private SinExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the {@link Math.sin} of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public SinExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.sin", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/SqrtExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the square root of the operand.
8 | */
9 | public class SqrtExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private SqrtExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the square root of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public SqrtExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.sqrt", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/TanExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import edu.washington.escience.myria.Type;
4 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
5 |
6 | /**
7 | * Take the {@link Math.tan} of the operand.
8 | */
9 | public class TanExpression extends UnaryExpression {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * This is not really unused, it's used automagically by Jackson deserialization.
15 | */
16 | @SuppressWarnings("unused")
17 | private TanExpression() {
18 | super();
19 | }
20 |
21 | /**
22 | * Take the {@link Math.tan} of the operand.
23 | *
24 | * @param operand the operand.
25 | */
26 | public TanExpression(final ExpressionOperator operand) {
27 | super(operand);
28 | }
29 |
30 | @Override
31 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
32 | checkAndReturnDefaultNumericType(parameters);
33 | return Type.DOUBLE_TYPE;
34 | }
35 |
36 | @Override
37 | public String getJavaString(final ExpressionOperatorParameter parameters) {
38 | return getFunctionCallUnaryString("Math.tan", parameters);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/WorkerIdExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import java.util.Objects;
4 |
5 | import edu.washington.escience.myria.Type;
6 | import edu.washington.escience.myria.expression.evaluate.ExpressionOperatorParameter;
7 |
8 | /**
9 | * Expression operator that returns the worker ID.
10 | */
11 | public class WorkerIdExpression extends ZeroaryExpression {
12 | /***/
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | * An expressions that returns the worker (or master) id.
17 | */
18 | public WorkerIdExpression() {}
19 |
20 | @Override
21 | public String getJavaString(final ExpressionOperatorParameter parameters) {
22 | return String.valueOf(parameters.getWorkerId());
23 | }
24 |
25 | @Override
26 | public Type getOutputType(final ExpressionOperatorParameter parameters) {
27 | return Type.INT_TYPE;
28 | }
29 |
30 | @Override
31 | public int hashCode() {
32 | return Objects.hash(getClass().getCanonicalName());
33 | }
34 |
35 | @Override
36 | public boolean equals(final Object other) {
37 | return (other != null && WorkerIdExpression.class.equals(other.getClass()));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/ZeroaryExpression.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression;
2 |
3 | import java.util.Collections;
4 | import java.util.List;
5 |
6 | /**
7 | * An ExpressionOperator with no children.
8 | */
9 | public abstract class ZeroaryExpression extends ExpressionOperator {
10 | /***/
11 | private static final long serialVersionUID = 1L;
12 |
13 | @Override
14 | @SuppressWarnings("unchecked")
15 | public List getChildren() {
16 | return Collections.EMPTY_LIST;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/evaluate/BooleanEvalInterface.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression.evaluate;
2 |
3 | import edu.washington.escience.myria.expression.VariableExpression;
4 | import edu.washington.escience.myria.storage.TupleBatch;
5 |
6 | /**
7 | * Interface for evaluating janino expressions that return bools.
8 | */
9 | public interface BooleanEvalInterface {
10 | /**
11 | * The interface for applying expressions. We only need a reference to the tuple batch and a row id. The variables
12 | * will be fetched from the tuple buffer using the rowId provided in {@link VariableExpression}.
13 | *
14 | * @param tb a tuple batch
15 | * @param rowId the row in the tb that should be used.
16 | * @return the result from the evaluation
17 | */
18 | boolean evaluate(final TupleBatch tb, final int rowId);
19 | }
20 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/evaluate/ExpressionEvalInterface.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.expression.evaluate;
2 |
3 | /**
4 | * Interface for evaluating a single {@link edu.washington.escience.myria.expression.Expression} and appending the
5 | * results to a column, along with a count of results.
6 | */
7 | public interface ExpressionEvalInterface {}
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/evaluate/package-info.java:
--------------------------------------------------------------------------------
1 | /***/
2 | package edu.washington.escience.myria.expression.evaluate;
3 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/expression/package-info.java:
--------------------------------------------------------------------------------
1 | /***/
2 | package edu.washington.escience.myria.expression;
3 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/ByteSink.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.io;
5 |
6 | import java.io.ByteArrayOutputStream;
7 | import java.io.IOException;
8 | import java.io.OutputStream;
9 |
10 | public class ByteSink implements DataSink {
11 | /** Required for Java serialization. */
12 | private static final long serialVersionUID = 1L;
13 |
14 | private transient ByteArrayOutputStream writerOutput;
15 |
16 | @Override
17 | public OutputStream getOutputStream() throws IOException {
18 | if (writerOutput == null) {
19 | writerOutput = new ByteArrayOutputStream();
20 | }
21 | return writerOutput;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/EmptySource.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.io;
2 |
3 | import java.io.ByteArrayInputStream;
4 | import java.io.IOException;
5 | import java.io.InputStream;
6 |
7 | /**
8 | * A data source with no tuples.
9 | *
10 | * @author whitaker
11 | */
12 | public class EmptySource implements DataSource {
13 |
14 | @Override
15 | public InputStream getInputStream() throws IOException {
16 | return new ByteArrayInputStream(new byte[0]);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/FileSink.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.io;
2 |
3 | import java.io.IOException;
4 | import java.io.FileOutputStream;
5 | import java.io.OutputStream;
6 | import java.nio.file.Path;
7 | import java.nio.file.Paths;
8 |
9 | import com.fasterxml.jackson.annotation.JsonProperty;
10 |
11 | import edu.washington.escience.myria.coordinator.CatalogException;
12 |
13 | public class FileSink implements DataSink {
14 | /** Required for Java serialization. */
15 | private static final long serialVersionUID = 1L;
16 |
17 | @JsonProperty private String filename;
18 |
19 | public FileSink(@JsonProperty(value = "filename", required = true) final String filename)
20 | throws CatalogException {
21 | this.filename = filename;
22 | }
23 |
24 | @Override
25 | public OutputStream getOutputStream() throws IOException {
26 | return new FileOutputStream(filename);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/InputStreamSource.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.io;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 | import java.util.Objects;
6 |
7 | /**
8 | * A data source that simply wraps an input stream.
9 | */
10 | public class InputStreamSource implements DataSource {
11 |
12 | /** The source input stream. */
13 | private final InputStream stream;
14 |
15 | /**
16 | * Returns a {@link DataSource} that wraps the specified {@link InputStream}.
17 | *
18 | * @param stream the source of data.
19 | */
20 | public InputStreamSource(final InputStream stream) {
21 | this.stream =
22 | Objects.requireNonNull(stream, "Parameter stream to InputStreamSource may not be null");
23 | }
24 |
25 | @Override
26 | public InputStream getInputStream() throws IOException {
27 | return stream;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/PipeSink.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.io;
5 |
6 | import java.io.IOException;
7 | import java.io.OutputStream;
8 | import java.io.PipedInputStream;
9 | import java.io.PipedOutputStream;
10 |
11 | import edu.washington.escience.myria.MyriaConstants;
12 | import edu.washington.escience.myria.api.PipedStreamingOutput;
13 |
14 | /**
15 | *
16 | */
17 | public class PipeSink implements DataSink {
18 | /** Required for Java serialization. */
19 | private static final long serialVersionUID = 1L;
20 |
21 | final PipedOutputStream writerOutput;
22 | final PipedInputStream input;
23 | final PipedStreamingOutput responseEntity;
24 |
25 | public PipeSink() throws IOException {
26 | writerOutput = new PipedOutputStream();
27 | input = new PipedInputStream(writerOutput, MyriaConstants.DEFAULT_PIPED_INPUT_STREAM_SIZE);
28 | responseEntity = new PipedStreamingOutput(input);
29 | }
30 |
31 | @Override
32 | public OutputStream getOutputStream() {
33 | return writerOutput;
34 | }
35 |
36 | public PipedStreamingOutput getResponse() {
37 | return responseEntity;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/io/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Input/output.
3 | */
4 | package edu.washington.escience.myria.io;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/AbstractDbInsert.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package edu.washington.escience.myria.operator;
5 |
6 | import com.google.common.collect.ImmutableMap;
7 |
8 | import edu.washington.escience.myria.storage.TupleUtils;
9 |
10 | /**
11 | * A temporary relation that is inserted into the database.
12 | */
13 | public abstract class AbstractDbInsert extends RootOperator implements DbWriter {
14 | /** Required for Java serialization. */
15 | private static final long serialVersionUID = 1L;
16 |
17 | /**
18 | * Construct this abstract database insert operator to insert tuples from its child into the database.
19 | *
20 | * @param child the source of tuples.
21 | */
22 | public AbstractDbInsert(final Operator child) {
23 | super(child);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/DbReader.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator;
2 |
3 | import java.util.Set;
4 |
5 | import edu.washington.escience.myria.RelationKey;
6 |
7 | /** An interface for an operator that reads from a relation in the database. */
8 | public interface DbReader {
9 | /**
10 | * Returns the set of relations that this operator reads.
11 | *
12 | * @return the set of relations that this operator reads.
13 | */
14 | Set readSet();
15 | }
16 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/DbWriter.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator;
2 |
3 | import java.util.Map;
4 |
5 | import edu.washington.escience.myria.RelationKey;
6 | import edu.washington.escience.myria.parallel.RelationWriteMetadata;
7 |
8 | /** An interface for an operator that writes to a relation in the database. */
9 | public interface DbWriter {
10 | /**
11 | * Returns the relations that this operator writes, and their schemas.
12 | *
13 | * @return the relations that this operator writes, and their schemas.
14 | */
15 | Map writeSet();
16 | }
17 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/EOSSource.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator;
2 |
3 | import com.google.common.collect.ImmutableMap;
4 |
5 | import edu.washington.escience.myria.DbException;
6 | import edu.washington.escience.myria.Schema;
7 | import edu.washington.escience.myria.storage.TupleBatch;
8 |
9 | /**
10 | * Emit an EOS directly and do nothing else.
11 | * */
12 | public class EOSSource extends LeafOperator {
13 |
14 | /**
15 | *
16 | */
17 | private static final long serialVersionUID = 1L;
18 |
19 | @Override
20 | protected void init(final ImmutableMap execEnvVars) throws DbException {}
21 |
22 | @Override
23 | protected void cleanup() throws DbException {}
24 |
25 | @Override
26 | protected final TupleBatch fetchNextReady() throws DbException {
27 | setEOS();
28 | return null;
29 | }
30 |
31 | @Override
32 | public final Schema generateSchema() {
33 | return Schema.EMPTY_SCHEMA;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/LeafOperator.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator;
2 |
3 | /**
4 | * Simple abstract operator meant to make it easy to implement leaf operators.
5 | *
6 | *
7 | */
8 | public abstract class LeafOperator extends Operator {
9 | /** Required for Java serialization. */
10 | private static final long serialVersionUID = 1L;
11 |
12 | @Override
13 | public final Operator[] getChildren() {
14 | return NO_CHILDREN;
15 | }
16 |
17 | @Override
18 | public final void setChildren(final Operator[] children) {
19 | throw new UnsupportedOperationException();
20 | }
21 |
22 | @Override
23 | protected void checkEOSAndEOI() {
24 | // for reading static files, e.g. scan, there is no EOI
25 | setEOS();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/StreamingStateful.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator;
2 |
3 | import java.util.List;
4 |
5 | import edu.washington.escience.myria.Schema;
6 |
7 | /**
8 | */
9 | public interface StreamingStateful {
10 | /**
11 | * set its streaming states.
12 | *
13 | * @param states the streaming states.
14 | */
15 | void setStreamingStates(final List states);
16 |
17 | /** @return its states. */
18 | List getStreamingStates();
19 |
20 | /** @return the schema of the input to the streaming state. */
21 | Schema getInputSchema();
22 | }
23 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/agg/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Aggregates.
3 | */
4 | @ParametersAreNonnullByDefault
5 | package edu.washington.escience.myria.operator.agg;
6 |
7 | import javax.annotation.ParametersAreNonnullByDefault;
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/failures/InjectedFailureException.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.failures;
2 |
3 | import edu.washington.escience.myria.DbException;
4 |
5 | /**
6 | * Exception denoting a injected failure.
7 | * */
8 | public class InjectedFailureException extends DbException {
9 |
10 | /**
11 | *
12 | */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | * @param message the message describing the exception.
17 | * */
18 | public InjectedFailureException(final String message) {
19 | super(message);
20 | }
21 |
22 | /**
23 | * @param e the cause of this Exception.
24 | * */
25 | public InjectedFailureException(final Throwable e) {
26 | super(e);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/failures/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Operators used to create and test failures.
3 | */
4 | package edu.washington.escience.myria.operator.failures;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/LocalMultiwayProducer.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.network;
2 |
3 | import edu.washington.escience.myria.operator.Operator;
4 | import edu.washington.escience.myria.operator.network.distribute.BroadcastDistributeFunction;
5 | import edu.washington.escience.myria.parallel.ExchangePairID;
6 | import edu.washington.escience.myria.parallel.ipc.IPCConnectionPool;
7 |
8 | /** A producer that duplicates tuple batches to corresponding consumers. */
9 | public final class LocalMultiwayProducer extends GenericShuffleProducer {
10 |
11 | /** Required for Java serialization. */
12 | private static final long serialVersionUID = 1L;
13 |
14 | /**
15 | * @param child the child who provides data for this producer to distribute.
16 | * @param operatorIDs destination operators the data goes
17 | */
18 | public LocalMultiwayProducer(final Operator child, final ExchangePairID[] operatorIDs) {
19 | super(
20 | child,
21 | operatorIDs,
22 | new int[] {IPCConnectionPool.SELF_IPC_ID},
23 | new BroadcastDistributeFunction());
24 | this.distributeFunction.setDestinations(1, operatorIDs.length);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/distribute/BroadcastDistributeFunction.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.network.distribute;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 |
5 | import edu.washington.escience.myria.util.MyriaArrayUtils;
6 |
7 | /**
8 | * Broadcast distribute function.
9 | */
10 | public final class BroadcastDistributeFunction extends DistributeFunction {
11 |
12 | /** Required for Java serialization. */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | */
17 | @JsonCreator
18 | public BroadcastDistributeFunction() {
19 | super(new SinglePartitionFunction());
20 | }
21 |
22 | @Override
23 | public void setDestinations(final int numWorker, final int numOperatorId) {
24 | partitionToDestination = MyriaArrayUtils.create2DHorizontalIndexList(numWorker * numOperatorId);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/distribute/IdentityDistributeFunction.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.network.distribute;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 |
6 | import edu.washington.escience.myria.util.MyriaArrayUtils;
7 |
8 | /**
9 | * Implementation of a DistributeFunction that maps a tuple to a worker as specified in an INT column (i.e. a --> a).
10 | */
11 | public final class IdentityDistributeFunction extends DistributeFunction {
12 |
13 | /** Required for Java serialization. */
14 | private static final long serialVersionUID = 1L;
15 |
16 | /**
17 | * @param index the column index for distributing
18 | */
19 | @JsonCreator
20 | public IdentityDistributeFunction(@JsonProperty("index") final int index) {
21 | super(new IdentityPartitionFunction(index));
22 | }
23 |
24 | @Override
25 | public void setDestinations(int numWorker, int numOperatorId) {
26 | partitionToDestination = MyriaArrayUtils.create2DVerticalIndexList(numWorker);
27 | partitionFunction.setNumPartitions(numWorker);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/distribute/RoundRobinDistributeFunction.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.network.distribute;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 |
5 | import edu.washington.escience.myria.util.MyriaArrayUtils;
6 |
7 | /**
8 | * Round robin distribute function.
9 | */
10 | public final class RoundRobinDistributeFunction extends DistributeFunction {
11 |
12 | /** Required for Java serialization. */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | */
17 | @JsonCreator
18 | public RoundRobinDistributeFunction() {
19 | super(new RoundRobinPartitionFunction());
20 | }
21 |
22 | @Override
23 | public void setDestinations(final int numWorker, final int numOperatorId) {
24 | partitionToDestination = MyriaArrayUtils.create2DVerticalIndexList(numWorker);
25 | partitionFunction.setNumPartitions(numWorker);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/distribute/SinglePartitionFunction.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.operator.network.distribute;
2 |
3 | import javax.annotation.Nonnull;
4 |
5 | import com.fasterxml.jackson.annotation.JsonCreator;
6 |
7 | import edu.washington.escience.myria.storage.TupleBatch;
8 |
9 | /** return a fixed integer. */
10 | public final class SinglePartitionFunction extends PartitionFunction {
11 |
12 | /** Required for Java serialization. */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | */
17 | @JsonCreator
18 | public SinglePartitionFunction() {
19 | setNumPartitions(1);
20 | }
21 |
22 | @Override
23 | public TupleBatch[] partition(@Nonnull final TupleBatch tb) {
24 | return new TupleBatch[] {tb};
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/distribute/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Functions that map tuples to machine partitions.
3 | */
4 | package edu.washington.escience.myria.operator.network.distribute;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/network/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Operators that exchange data over the network.
3 | */
4 | package edu.washington.escience.myria.operator.network;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/operator/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | *
6 | */
7 | package edu.washington.escience.myria.operator;
8 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Main package used for the Myria project.
3 | */
4 | package edu.washington.escience.myria;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/QueryExecutionMode.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel;
2 |
3 | /**
4 | * query execution mode, blocking or non-blocking. Always use the NON_BLOCKING mode. The BLOCKING mode may not work and
5 | * may get abandoned.
6 | * */
7 | public enum QueryExecutionMode {
8 | /**
9 | * blocking execution, call next() and fetchNext().
10 | * */
11 | BLOCKING,
12 |
13 | /**
14 | * non-blocking execution, call nextReady() and fetchNextReady().
15 | * */
16 | NON_BLOCKING;
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/QueryKilledException.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel;
2 |
3 | /**
4 | * The exception for describing the killed cause of a query failure. A query failure cause by killed is completely
5 | * different from a query failure cause by other Exception. The former failure is intended while the latter is
6 | * surprising.
7 | * */
8 | public class QueryKilledException extends InterruptedException {
9 |
10 | /**
11 | *
12 | */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | * Default constructor.
17 | * */
18 | public QueryKilledException() {}
19 |
20 | /**
21 | * @param s the message describing the detail of this Exception.
22 | * */
23 | public QueryKilledException(final String s) {
24 | super(s);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/WorkerFailedException.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel;
2 |
3 | /**
4 | * The exception for failure of a REEF evaluator/context/task corresponding to a Myria worker.
5 | * */
6 | public class WorkerFailedException extends Exception {
7 |
8 | /**
9 | *
10 | */
11 | private static final long serialVersionUID = 1L;
12 |
13 | /**
14 | * Default constructor.
15 | * */
16 | public WorkerFailedException() {}
17 |
18 | /**
19 | * @param cause the Throwable causing this Exception.
20 | * */
21 | public WorkerFailedException(final Throwable cause) {
22 | super(cause);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/ipc/EqualityCloseFuture.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel.ipc;
2 |
3 | import org.jboss.netty.channel.Channel;
4 |
5 | /**
6 | * A condition close future that is conditioned on the equality of the expected object and the actual object.
7 | *
8 | * @param type.
9 | * */
10 | public class EqualityCloseFuture extends ConditionCloseFuture {
11 |
12 | /**
13 | * expected value.
14 | * */
15 | private final T expected;
16 |
17 | /**
18 | * @param channel the channel who owns the future
19 | * @param expected the expected value
20 | * */
21 | EqualityCloseFuture(final Channel channel, final T expected) {
22 | super(channel);
23 | this.expected = expected;
24 | }
25 |
26 | /**
27 | * Set the actual value.
28 | *
29 | * @param actual the actual value
30 | * */
31 | public final void setActual(final T actual) {
32 | if (expected == null) {
33 | setCondition(actual == null);
34 | } else {
35 | setCondition(expected.equals(actual));
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/ipc/IPCEvent.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel.ipc;
2 |
3 | /**
4 | * An @{link IPCEvent} represents an event from the IPC layer. Each {@link IPCEvent} can have an attachment so that the
5 | * event source can provide detailed information to the event listeners.
6 | *
7 | * */
8 | public interface IPCEvent {
9 |
10 | /**
11 | * event type.
12 | * */
13 | public final class EventType {
14 | /**
15 | * only for human readability.
16 | */
17 | private final String desc;
18 |
19 | /**
20 | * @param desc the human readable description of the type.
21 | * */
22 | public EventType(final String desc) {
23 | this.desc = desc;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | return "EventType(" + desc + ")";
29 | }
30 | }
31 |
32 | /**
33 | * @return the event type.
34 | * */
35 | EventType getType();
36 |
37 | /**
38 | * @return attachment.
39 | * */
40 | Object getAttachment();
41 | }
42 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/ipc/IPCEventListener.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel.ipc;
2 |
3 | import java.util.EventListener;
4 |
5 | /**
6 | * IPC event listener, for calling back when a specific IOEvent is fired.
7 | *
8 | * */
9 | public interface IPCEventListener extends EventListener {
10 |
11 | /**
12 | * An IPCEvent is fired.
13 | *
14 | * @param event the event instance.
15 | * */
16 | void triggered(IPCEvent event);
17 | }
18 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/ipc/ShortMessageProcessor.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.parallel.ipc;
2 |
3 | import org.jboss.netty.channel.Channel;
4 |
5 | import edu.washington.escience.myria.util.Attachmentable;
6 |
7 | /**
8 | * Short message processor.
9 | *
10 | * @param the type of application defined data the short message processor is going to process.
11 | */
12 | public interface ShortMessageProcessor extends Attachmentable {
13 |
14 | /**
15 | * process a short message sent from the channel.
16 | *
17 | * @param ch the channel through which the message is sent.
18 | * @param message the message.
19 | * @return true if the message is successfully processed.If the return value is false, the caller should pause to push
20 | * data into the processor and do some message caching. If the return value is false and still the data are
21 | * pushed into the processor, the semantic is undefined.
22 | * */
23 | boolean processMessage(final Channel ch, final IPCMessage.Data message);
24 | }
25 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/ipc/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * IPC layer.
3 | */
4 | package edu.washington.escience.myria.parallel.ipc;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/parallel/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Parallel functionality for the Myria project.
3 | */
4 | package edu.washington.escience.myria.parallel;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/perfenforce/PerfEnforceException.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.perfenforce;
2 |
3 | import org.slf4j.LoggerFactory;
4 |
5 | /**
6 | * The PerfEnforceException class. Only thrown when running PerfEnforce features.
7 | */
8 | public final class PerfEnforceException extends Exception {
9 |
10 | /** Required for Java serialization. */
11 | private static final long serialVersionUID = 1L;
12 | /** The logger for this class. */
13 | private static final org.slf4j.Logger LOGGER =
14 | LoggerFactory.getLogger(PerfEnforceException.class);
15 |
16 | /**
17 | * The PerfEnforceException constructor.
18 | */
19 | public PerfEnforceException() {
20 | super();
21 | }
22 |
23 | /**
24 | * The PerfEnforceException constructor that takes a message as input.
25 | * @param message the message describing the error
26 | */
27 | public PerfEnforceException(final String message) {
28 | super(message);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/profiling/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Query profiling functionality for the Myria project.
3 | */
4 | package edu.washington.escience.myria.profiling;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/storage/ColumnInterface.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.storage;
2 |
3 | import edu.washington.escience.myria.Type;
4 |
5 | /**
6 | * An interface for an object holding a single column of tuples.
7 | */
8 | public interface ColumnInterface {
9 | /**
10 | * @return a Myria {@link Type} object explaining what type of data is in this column.
11 | */
12 | Type getType();
13 |
14 | /**
15 | * Returns the number of elements in this column.
16 | *
17 | * @return the number of elements in this column.
18 | */
19 | int size();
20 | }
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/storage/TupleTable.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.storage;
2 |
3 | import edu.washington.escience.myria.Schema;
4 |
5 | /**
6 | * Any object that is a table (2-D) of tuples.
7 | *
8 | */
9 | public interface TupleTable {
10 | /**
11 | * Returns the Schema of the tuples in this table.
12 | *
13 | * @return the Schema of the tuples in this table.
14 | */
15 | Schema getSchema();
16 |
17 | /**
18 | * The number of columns in this table.
19 | *
20 | * @return number of columns in this tableBatch.
21 | */
22 | int numColumns();
23 |
24 | /**
25 | * Returns the number of valid tuples in this table.
26 | *
27 | * @return the number of valid tuples in this table.
28 | */
29 | int numTuples();
30 | }
31 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/storage/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Java classes and interfaces related to in-memory storage of data.
3 | */
4 | package edu.washington.escience.myria.storage;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/tools/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Tools.
3 | */
4 | package edu.washington.escience.myria.tools;
5 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/util/Attachmentable.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.util;
2 |
3 | /**
4 | * A utility interface denoting a class is able to attach an Object.
5 | * */
6 | public interface Attachmentable {
7 |
8 | /**
9 | * @return attachment.
10 | * */
11 | Object getAttachment();
12 |
13 | /**
14 | * Set attachment to the new value and return old value.
15 | *
16 | * @return the old value.
17 | * @param attachment the new attachment
18 | * */
19 | Object setAttachment(final Object attachment);
20 | }
21 |
--------------------------------------------------------------------------------
/src/edu/washington/escience/myria/util/AttachmentableAdapter.java:
--------------------------------------------------------------------------------
1 | package edu.washington.escience.myria.util;
2 |
3 | import java.util.concurrent.atomic.AtomicReference;
4 |
5 | /**
6 | * A implementation for the {@link Attachmentable} interface.
7 | * */
8 | public abstract class AttachmentableAdapter implements Attachmentable {
9 |
10 | /**
11 | * Attachment holder.
12 | * */
13 | private final AtomicReference