zillabyte-cli 0.9.24 → 0.9.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/zillabyte/cli/download.rb +1 -1
- data/lib/zillabyte/cli/flows.rb +6 -2
- data/lib/zillabyte/common/log_fetcher.rb +3 -8
- data/lib/zillabyte-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGEwYzFlOWIyNTcxMjcwNDhlMDE0ODhlYzI1ODY4Y2EyOWQ0NDYzOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTQ5YzllZjNkZWIyYTA0Mjc2OWZjYjI4ODdhMTk4N2ZkZjRhN2M5MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjM0Mjk3NzM1MGQ4ZWNlMjE0YTlhZGVlMThmZjJiMmRmN2U3NGQ3NDk3MGFk
|
10
|
+
NTE2NjQyYzNhMGEzMGJiNzhkMWVkZWExMjdlM2MxZWFkY2IzMTkxZjVhYjM5
|
11
|
+
MTY5NjI3YzE4MTY5YzExNjk1YTNlOGNjNTMwNjA5NGQzYTBhMmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTEzYjE1OGRiNDEyYTFhNjA3NGM5MjZhYzQzOGFlMWZhNzlmOTBmOGQ3NzYw
|
14
|
+
MjEyMjRkMjcwOWVhMjNiNjdhNzk2NjE4YmJlYTQ0Mjk2MTk2MDFiOGViNzVh
|
15
|
+
NTUzZDkzY2JkZTI2NTY2OTNkOGUzODM5N2UxNTE1ZGQzYmNlZmE=
|
@@ -41,7 +41,7 @@ class Zillabyte::Command::Download < Zillabyte::Command::Base
|
|
41
41
|
# Delete old jar(s)
|
42
42
|
FileUtils.rm_rf("#{jar_home}/.", secure: true) if !jars.empty?
|
43
43
|
# Copy new jar from gmb
|
44
|
-
`cp ~/zb1/motherbrain
|
44
|
+
`cp ~/zb1/motherbrain/target/#{LATEST_JAR_VERSION}.jar #{jar_home}`
|
45
45
|
current_jar_version = LATEST_JAR_VERSION
|
46
46
|
else
|
47
47
|
if !jars.empty?
|
data/lib/zillabyte/cli/flows.rb
CHANGED
@@ -675,7 +675,8 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
|
|
675
675
|
# Run a flow locally with sample data.
|
676
676
|
#
|
677
677
|
# --dir DIR # Flow directory
|
678
|
-
# --input_file
|
678
|
+
# --input_file INTPUT_FILE # Input csv file containing parameters for multiple queries to an rpc
|
679
|
+
# --output_prefix OUTPUT_PREFIX # Prefix for output file containing app results. Results will be stored in [prefix]_[sink_name].csv for each sink.
|
679
680
|
# --env ENV # HIDDEN
|
680
681
|
# --use_local_jar # HIDDEN
|
681
682
|
#
|
@@ -696,7 +697,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
|
|
696
697
|
exit
|
697
698
|
end
|
698
699
|
|
699
|
-
if meta["flow_type"] == "component"
|
700
|
+
if meta["flow_type"] == "component" #component
|
700
701
|
file = options[:input_file]
|
701
702
|
|
702
703
|
component_input_stream = nil
|
@@ -736,6 +737,8 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
|
|
736
737
|
exit(1)
|
737
738
|
end
|
738
739
|
component_args = {component_input_stream => component_args}
|
740
|
+
else #app
|
741
|
+
output_prefix = options[:output_prefix]
|
739
742
|
end
|
740
743
|
|
741
744
|
# Check that multilang version is atleast 0.1.0
|
@@ -761,6 +764,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
|
|
761
764
|
cmd += " --api.host api.zillabyte.com --api.port 80"
|
762
765
|
end
|
763
766
|
cmd += " --rpc.args #{Shellwords.escape(component_args.to_json)}" if component_args
|
767
|
+
cmd += " --output.prefix #{output_prefix}" if output_prefix
|
764
768
|
|
765
769
|
match_str = "[f#{meta["name"]}]"
|
766
770
|
display "Begin local execution..."
|
@@ -22,15 +22,10 @@ class LogFetcher
|
|
22
22
|
exit_on = [exit_on] unless exit_on.is_a?(Array)
|
23
23
|
|
24
24
|
@color_map = {}
|
25
|
-
|
26
|
-
local_file = "/tmp/flows/f#{hash["flow"]}/flow_logs/flow_#{hash["flow"]}.log"
|
27
|
-
if(hash["server"] == "localhost" && File.exists?(local_file))
|
28
|
-
cmd = "tail -n 500 -F \"#{local_file}\""
|
29
|
-
else
|
30
|
-
cmd = "curl -G http://#{hash["flow"]}:#{hash["token"]}@#{ip}:#{hash["port"]}/getLogs?flow=#{hash["flow"]}"
|
31
|
-
end
|
32
25
|
|
33
|
-
|
26
|
+
# TODO: (nitpick) we should use ruby instead of shelling to curl -- we can't guarantee curl will exist
|
27
|
+
cmd = "curl -G http://#{hash["flow"]}:#{hash["token"]}@#{ip}:#{hash["port"]}/getLogs?flow=#{hash["flow"]}"
|
28
|
+
|
34
29
|
begin
|
35
30
|
PTY.spawn( cmd ) do |r, w, pid|
|
36
31
|
@pid = pid;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillabyte-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zillabyte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|