masamune 0.15.6 → 0.16.0
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 +4 -4
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/bin/{masamune-elastic-mapreduce → masamune-aws-emr} +3 -3
- data/bin/masamune-dump +1 -1
- data/bin/masamune-hive +1 -1
- data/bin/masamune-psql +1 -1
- data/bin/masamune-shell +1 -1
- data/lib/masamune.rb +1 -1
- data/lib/masamune/actions.rb +1 -1
- data/lib/masamune/actions/{elastic_mapreduce.rb → aws_emr.rb} +14 -30
- data/lib/masamune/actions/data_flow.rb +1 -1
- data/lib/masamune/actions/date_parse.rb +1 -1
- data/lib/masamune/actions/execute.rb +1 -1
- data/lib/masamune/actions/filesystem.rb +1 -1
- data/lib/masamune/actions/hadoop_filesystem.rb +1 -1
- data/lib/masamune/actions/hadoop_streaming.rb +10 -8
- data/lib/masamune/actions/hive.rb +2 -2
- data/lib/masamune/actions/invoke_parallel.rb +1 -1
- data/lib/masamune/actions/postgres.rb +1 -1
- data/lib/masamune/actions/postgres_admin.rb +1 -1
- data/lib/masamune/actions/s3cmd.rb +1 -1
- data/lib/masamune/actions/transform.rb +1 -1
- data/lib/masamune/after_initialize_callbacks.rb +1 -1
- data/lib/masamune/cached_filesystem.rb +2 -2
- data/lib/masamune/commands.rb +1 -1
- data/lib/masamune/commands/{elastic_mapreduce.rb → aws_emr.rb} +38 -29
- data/lib/masamune/commands/hadoop_filesystem.rb +1 -1
- data/lib/masamune/commands/hadoop_streaming.rb +1 -1
- data/lib/masamune/commands/hive.rb +1 -1
- data/lib/masamune/commands/postgres.rb +1 -1
- data/lib/masamune/commands/postgres_admin.rb +1 -1
- data/lib/masamune/commands/postgres_common.rb +1 -1
- data/lib/masamune/commands/retry_with_backoff.rb +1 -1
- data/lib/masamune/commands/s3cmd.rb +1 -1
- data/lib/masamune/commands/shell.rb +11 -7
- data/lib/masamune/configuration.rb +2 -38
- data/lib/masamune/data_plan.rb +1 -1
- data/lib/masamune/data_plan/builder.rb +1 -1
- data/lib/masamune/data_plan/elem.rb +1 -1
- data/lib/masamune/data_plan/engine.rb +1 -1
- data/lib/masamune/data_plan/rule.rb +1 -1
- data/lib/masamune/data_plan/set.rb +1 -1
- data/lib/masamune/environment.rb +1 -1
- data/lib/masamune/filesystem.rb +1 -1
- data/lib/masamune/has_environment.rb +1 -1
- data/lib/masamune/helpers.rb +1 -1
- data/lib/masamune/helpers/postgres.rb +1 -1
- data/lib/masamune/io.rb +1 -1
- data/lib/masamune/last_element.rb +1 -1
- data/lib/masamune/method_logger.rb +1 -1
- data/lib/masamune/multi_io.rb +1 -1
- data/lib/masamune/schema.rb +1 -1
- data/lib/masamune/schema/catalog.rb +1 -1
- data/lib/masamune/schema/column.rb +1 -1
- data/lib/masamune/schema/dimension.rb +1 -1
- data/lib/masamune/schema/fact.rb +1 -1
- data/lib/masamune/schema/map.rb +1 -1
- data/lib/masamune/schema/row.rb +1 -1
- data/lib/masamune/schema/store.rb +1 -1
- data/lib/masamune/schema/table.rb +1 -1
- data/lib/masamune/schema/table_reference.rb +1 -1
- data/lib/masamune/spec_helper.rb +1 -1
- data/lib/masamune/string_format.rb +1 -1
- data/lib/masamune/tasks/aws_emr_thor.rb +79 -0
- data/lib/masamune/tasks/dump_thor.rb +1 -1
- data/lib/masamune/tasks/hive_thor.rb +2 -2
- data/lib/masamune/tasks/postgres_thor.rb +1 -1
- data/lib/masamune/tasks/shell_thor.rb +1 -1
- data/lib/masamune/template.rb +1 -1
- data/lib/masamune/thor.rb +1 -1
- data/lib/masamune/topological_hash.rb +1 -1
- data/lib/masamune/transform.rb +1 -1
- data/lib/masamune/transform/bulk_upsert.rb +1 -1
- data/lib/masamune/transform/common.rb +1 -1
- data/lib/masamune/transform/common/denormalize_table.rb +1 -1
- data/lib/masamune/transform/consolidate_dimension.rb +1 -1
- data/lib/masamune/transform/deduplicate_dimension.rb +1 -1
- data/lib/masamune/transform/define_schema.rb +1 -1
- data/lib/masamune/transform/define_table.rb +1 -1
- data/lib/masamune/transform/denormalize_table.rb +1 -1
- data/lib/masamune/transform/hive.rb +1 -1
- data/lib/masamune/transform/hive/define_schema.hql.erb +1 -1
- data/lib/masamune/transform/hive/define_table.hql.erb +1 -1
- data/lib/masamune/transform/hive/define_table.rb +1 -1
- data/lib/masamune/transform/hive/denormalize_table.hql.erb +1 -1
- data/lib/masamune/transform/hive/denormalize_table.rb +1 -1
- data/lib/masamune/transform/insert_reference_values.rb +1 -1
- data/lib/masamune/transform/load_dimension.rb +1 -1
- data/lib/masamune/transform/load_fact.rb +1 -1
- data/lib/masamune/transform/operator.rb +1 -1
- data/lib/masamune/transform/postgres.rb +1 -1
- data/lib/masamune/transform/postgres/bulk_upsert.psql.erb +1 -1
- data/lib/masamune/transform/postgres/bulk_upsert.rb +1 -1
- data/lib/masamune/transform/postgres/deduplicate_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/deduplicate_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/define_foreign_key.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_index.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_inheritance.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_schema.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_table.rb +1 -1
- data/lib/masamune/transform/postgres/define_unique.psql.erb +1 -1
- data/lib/masamune/transform/postgres/denormalize_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/denormalize_table.rb +1 -1
- data/lib/masamune/transform/postgres/insert_reference_values.psql.erb +1 -1
- data/lib/masamune/transform/postgres/insert_reference_values.rb +1 -1
- data/lib/masamune/transform/postgres/relabel_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/relabel_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/replace_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/rollup_fact.psql.erb +1 -1
- data/lib/masamune/transform/postgres/rollup_fact.rb +1 -1
- data/lib/masamune/transform/postgres/snapshot_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/snapshot_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/stage_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/stage_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/stage_fact.psql.erb +1 -1
- data/lib/masamune/transform/postgres/stage_fact.rb +1 -1
- data/lib/masamune/transform/relabel_dimension.rb +1 -1
- data/lib/masamune/transform/rollup_fact.rb +1 -1
- data/lib/masamune/transform/snapshot_dimension.rb +1 -1
- data/lib/masamune/transform/stage_dimension.rb +1 -1
- data/lib/masamune/transform/stage_fact.rb +1 -1
- data/lib/masamune/version.rb +2 -2
- data/spec/fixtures/aggregate.sql.erb +1 -1
- data/spec/fixtures/comment.sql.erb +1 -1
- data/spec/fixtures/invalid.sql.erb +1 -1
- data/spec/fixtures/relative.sql.erb +1 -1
- data/spec/fixtures/simple.sql.erb +1 -1
- data/spec/fixtures/whitespace.sql.erb +1 -1
- data/spec/masamune/actions/{elastic_mapreduce_spec.rb → aws_emr_spec.rb} +22 -42
- data/spec/masamune/actions/execute_spec.rb +1 -1
- data/spec/masamune/actions/hadoop_filesystem_spec.rb +1 -1
- data/spec/masamune/actions/hadoop_streaming_spec.rb +8 -8
- data/spec/masamune/actions/hive_spec.rb +5 -5
- data/spec/masamune/actions/invoke_parallel_spec.rb +1 -1
- data/spec/masamune/actions/postgres_admin_spec.rb +1 -1
- data/spec/masamune/actions/postgres_spec.rb +1 -1
- data/spec/masamune/actions/s3cmd_spec.rb +1 -1
- data/spec/masamune/actions/transform_spec.rb +1 -1
- data/spec/masamune/after_initialization_callbacks_spec.rb +1 -1
- data/spec/masamune/cached_filesystem_spec.rb +1 -1
- data/spec/masamune/commands/aws_emr_spec.rb +115 -0
- data/spec/masamune/commands/hadoop_filesystem_spec.rb +1 -1
- data/spec/masamune/commands/hadoop_streaming_spec.rb +1 -1
- data/spec/masamune/commands/hive_spec.rb +1 -1
- data/spec/masamune/commands/postgres_admin_spec.rb +1 -1
- data/spec/masamune/commands/postgres_spec.rb +1 -1
- data/spec/masamune/commands/retry_with_backoff_spec.rb +1 -1
- data/spec/masamune/commands/s3cmd_spec.rb +1 -1
- data/spec/masamune/commands/shell_spec.rb +79 -2
- data/spec/masamune/configuration_spec.rb +1 -65
- data/spec/masamune/data_plan/builder_spec.rb +1 -1
- data/spec/masamune/data_plan/elem_spec.rb +1 -1
- data/spec/masamune/data_plan/engine_spec.rb +1 -1
- data/spec/masamune/data_plan/rule_spec.rb +1 -1
- data/spec/masamune/data_plan/set_spec.rb +1 -1
- data/spec/masamune/environment_spec.rb +1 -1
- data/spec/masamune/filesystem_spec.rb +1 -1
- data/spec/masamune/helpers/postgres_spec.rb +1 -1
- data/spec/masamune/rspec/job_fixture_spec.rb +1 -1
- data/spec/masamune/rspec/mock_filesystem_spec.rb +1 -1
- data/spec/masamune/rspec/shared_example_group_spec.rb +1 -1
- data/spec/masamune/schema/catalog_spec.rb +1 -1
- data/spec/masamune/schema/column_spec.rb +1 -1
- data/spec/masamune/schema/dimension_spec.rb +1 -1
- data/spec/masamune/schema/fact_spec.rb +1 -1
- data/spec/masamune/schema/map_spec.rb +1 -1
- data/spec/masamune/schema/row_spec.rb +1 -1
- data/spec/masamune/schema/store_spec.rb +1 -1
- data/spec/masamune/schema/table_spec.rb +1 -1
- data/spec/masamune/string_format_spec.rb +1 -1
- data/spec/masamune/tasks/aws_emr_thor_spec.rb +69 -0
- data/spec/masamune/tasks/dump_thor_spec.rb +1 -1
- data/spec/masamune/tasks/hive_thor_spec.rb +1 -1
- data/spec/masamune/tasks/postgres_thor_spec.rb +1 -1
- data/spec/masamune/tasks/shell_thor_spec.rb +1 -1
- data/spec/masamune/template_spec.rb +1 -1
- data/spec/masamune/thor_spec.rb +1 -1
- data/spec/masamune/transform/bulk_upsert.dimension_spec.rb +1 -1
- data/spec/masamune/transform/consolidate_dimension_spec.rb +1 -1
- data/spec/masamune/transform/deduplicate_dimension_spec.rb +1 -1
- data/spec/masamune/transform/define_schema_spec.rb +1 -1
- data/spec/masamune/transform/define_table.dimension_spec.rb +1 -1
- data/spec/masamune/transform/define_table.fact_spec.rb +1 -1
- data/spec/masamune/transform/define_table.table_spec.rb +1 -1
- data/spec/masamune/transform/denormalize_table_spec.rb +1 -1
- data/spec/masamune/transform/insert_reference_values.dimension_spec.rb +1 -1
- data/spec/masamune/transform/insert_reference_values.fact_spec.rb +1 -1
- data/spec/masamune/transform/load_dimension_spec.rb +1 -1
- data/spec/masamune/transform/load_fact_spec.rb +1 -1
- data/spec/masamune/transform/relabel_dimension_spec.rb +1 -1
- data/spec/masamune/transform/rollup_fact_spec.rb +1 -1
- data/spec/masamune/transform/snapshot_dimension_spec.rb +1 -1
- data/spec/masamune/transform/stage_dimension_spec.rb +1 -1
- data/spec/masamune/transform/stage_fact_spec.rb +1 -1
- data/spec/masamune_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/masamune/example_group.rb +1 -1
- data/spec/support/masamune/job_example_group.rb +1 -1
- data/spec/support/masamune/job_fixture.rb +1 -1
- data/spec/support/masamune/mock_command.rb +1 -1
- data/spec/support/masamune/mock_delegate.rb +1 -1
- data/spec/support/masamune/mock_filesystem.rb +1 -1
- data/spec/support/masamune/shared_example_group.rb +1 -1
- data/spec/support/masamune/step_example_group.rb +1 -1
- data/spec/support/masamune/step_fixture.rb +1 -1
- data/spec/support/masamune/task_example_group.rb +1 -1
- data/spec/support/masamune/thor_mute.rb +1 -1
- data/spec/support/rspec/example/action_example_group.rb +1 -1
- data/spec/support/rspec/example/task_example_group.rb +1 -1
- data/spec/support/rspec/example/transform_example_group.rb +1 -1
- data/spec/support/shared_examples/postgres_common_examples.rb +1 -1
- metadata +14 -13
- data/lib/masamune/commands/interactive.rb +0 -37
- data/lib/masamune/tasks/elastic_mapreduce_thor.rb +0 -61
- data/spec/masamune/tasks/elastic_mapreduce_thor_spec.rb +0 -54
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
3
|
+
# Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: masamune
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Andrews
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -198,7 +198,7 @@ email:
|
|
198
198
|
executables:
|
199
199
|
- masamune-shell
|
200
200
|
- masamune-hive
|
201
|
-
- masamune-
|
201
|
+
- masamune-aws-emr
|
202
202
|
- masamune-psql
|
203
203
|
- masamune-dump
|
204
204
|
extensions: []
|
@@ -207,16 +207,16 @@ files:
|
|
207
207
|
- LICENSE.txt
|
208
208
|
- README.md
|
209
209
|
- Rakefile
|
210
|
+
- bin/masamune-aws-emr
|
210
211
|
- bin/masamune-dump
|
211
|
-
- bin/masamune-elastic-mapreduce
|
212
212
|
- bin/masamune-hive
|
213
213
|
- bin/masamune-psql
|
214
214
|
- bin/masamune-shell
|
215
215
|
- lib/masamune.rb
|
216
216
|
- lib/masamune/actions.rb
|
217
|
+
- lib/masamune/actions/aws_emr.rb
|
217
218
|
- lib/masamune/actions/data_flow.rb
|
218
219
|
- lib/masamune/actions/date_parse.rb
|
219
|
-
- lib/masamune/actions/elastic_mapreduce.rb
|
220
220
|
- lib/masamune/actions/execute.rb
|
221
221
|
- lib/masamune/actions/filesystem.rb
|
222
222
|
- lib/masamune/actions/hadoop_filesystem.rb
|
@@ -230,11 +230,10 @@ files:
|
|
230
230
|
- lib/masamune/after_initialize_callbacks.rb
|
231
231
|
- lib/masamune/cached_filesystem.rb
|
232
232
|
- lib/masamune/commands.rb
|
233
|
-
- lib/masamune/commands/
|
233
|
+
- lib/masamune/commands/aws_emr.rb
|
234
234
|
- lib/masamune/commands/hadoop_filesystem.rb
|
235
235
|
- lib/masamune/commands/hadoop_streaming.rb
|
236
236
|
- lib/masamune/commands/hive.rb
|
237
|
-
- lib/masamune/commands/interactive.rb
|
238
237
|
- lib/masamune/commands/postgres.rb
|
239
238
|
- lib/masamune/commands/postgres_admin.rb
|
240
239
|
- lib/masamune/commands/postgres_common.rb
|
@@ -269,8 +268,8 @@ files:
|
|
269
268
|
- lib/masamune/schema/table_reference.rb
|
270
269
|
- lib/masamune/spec_helper.rb
|
271
270
|
- lib/masamune/string_format.rb
|
271
|
+
- lib/masamune/tasks/aws_emr_thor.rb
|
272
272
|
- lib/masamune/tasks/dump_thor.rb
|
273
|
-
- lib/masamune/tasks/elastic_mapreduce_thor.rb
|
274
273
|
- lib/masamune/tasks/hive_thor.rb
|
275
274
|
- lib/masamune/tasks/postgres_thor.rb
|
276
275
|
- lib/masamune/tasks/shell_thor.rb
|
@@ -335,7 +334,7 @@ files:
|
|
335
334
|
- spec/fixtures/relative.sql.erb
|
336
335
|
- spec/fixtures/simple.sql.erb
|
337
336
|
- spec/fixtures/whitespace.sql.erb
|
338
|
-
- spec/masamune/actions/
|
337
|
+
- spec/masamune/actions/aws_emr_spec.rb
|
339
338
|
- spec/masamune/actions/execute_spec.rb
|
340
339
|
- spec/masamune/actions/hadoop_filesystem_spec.rb
|
341
340
|
- spec/masamune/actions/hadoop_streaming_spec.rb
|
@@ -347,6 +346,7 @@ files:
|
|
347
346
|
- spec/masamune/actions/transform_spec.rb
|
348
347
|
- spec/masamune/after_initialization_callbacks_spec.rb
|
349
348
|
- spec/masamune/cached_filesystem_spec.rb
|
349
|
+
- spec/masamune/commands/aws_emr_spec.rb
|
350
350
|
- spec/masamune/commands/hadoop_filesystem_spec.rb
|
351
351
|
- spec/masamune/commands/hadoop_streaming_spec.rb
|
352
352
|
- spec/masamune/commands/hive_spec.rb
|
@@ -376,8 +376,8 @@ files:
|
|
376
376
|
- spec/masamune/schema/store_spec.rb
|
377
377
|
- spec/masamune/schema/table_spec.rb
|
378
378
|
- spec/masamune/string_format_spec.rb
|
379
|
+
- spec/masamune/tasks/aws_emr_thor_spec.rb
|
379
380
|
- spec/masamune/tasks/dump_thor_spec.rb
|
380
|
-
- spec/masamune/tasks/elastic_mapreduce_thor_spec.rb
|
381
381
|
- spec/masamune/tasks/hive_thor_spec.rb
|
382
382
|
- spec/masamune/tasks/postgres_thor_spec.rb
|
383
383
|
- spec/masamune/tasks/shell_thor_spec.rb
|
@@ -436,7 +436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
436
436
|
version: '0'
|
437
437
|
requirements: []
|
438
438
|
rubyforge_project:
|
439
|
-
rubygems_version: 2.
|
439
|
+
rubygems_version: 2.5.1
|
440
440
|
signing_key:
|
441
441
|
specification_version: 4
|
442
442
|
summary: Hybrid Data & Work Flow
|
@@ -447,7 +447,7 @@ test_files:
|
|
447
447
|
- spec/fixtures/relative.sql.erb
|
448
448
|
- spec/fixtures/simple.sql.erb
|
449
449
|
- spec/fixtures/whitespace.sql.erb
|
450
|
-
- spec/masamune/actions/
|
450
|
+
- spec/masamune/actions/aws_emr_spec.rb
|
451
451
|
- spec/masamune/actions/execute_spec.rb
|
452
452
|
- spec/masamune/actions/hadoop_filesystem_spec.rb
|
453
453
|
- spec/masamune/actions/hadoop_streaming_spec.rb
|
@@ -459,6 +459,7 @@ test_files:
|
|
459
459
|
- spec/masamune/actions/transform_spec.rb
|
460
460
|
- spec/masamune/after_initialization_callbacks_spec.rb
|
461
461
|
- spec/masamune/cached_filesystem_spec.rb
|
462
|
+
- spec/masamune/commands/aws_emr_spec.rb
|
462
463
|
- spec/masamune/commands/hadoop_filesystem_spec.rb
|
463
464
|
- spec/masamune/commands/hadoop_streaming_spec.rb
|
464
465
|
- spec/masamune/commands/hive_spec.rb
|
@@ -488,8 +489,8 @@ test_files:
|
|
488
489
|
- spec/masamune/schema/store_spec.rb
|
489
490
|
- spec/masamune/schema/table_spec.rb
|
490
491
|
- spec/masamune/string_format_spec.rb
|
492
|
+
- spec/masamune/tasks/aws_emr_thor_spec.rb
|
491
493
|
- spec/masamune/tasks/dump_thor_spec.rb
|
492
|
-
- spec/masamune/tasks/elastic_mapreduce_thor_spec.rb
|
493
494
|
- spec/masamune/tasks/hive_thor_spec.rb
|
494
495
|
- spec/masamune/tasks/postgres_thor_spec.rb
|
495
496
|
- spec/masamune/tasks/shell_thor_spec.rb
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# The MIT License (MIT)
|
2
|
-
#
|
3
|
-
# Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require 'delegate'
|
24
|
-
|
25
|
-
module Masamune::Commands
|
26
|
-
class Interactive < SimpleDelegator
|
27
|
-
|
28
|
-
def initialize(delegate, attrs = {})
|
29
|
-
super delegate
|
30
|
-
@interactive = attrs.fetch(:interactive, false)
|
31
|
-
end
|
32
|
-
|
33
|
-
def interactive?
|
34
|
-
@interactive
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# The MIT License (MIT)
|
2
|
-
#
|
3
|
-
# Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require 'masamune'
|
24
|
-
require 'thor'
|
25
|
-
|
26
|
-
module Masamune::Tasks
|
27
|
-
class ElasticMapreduceThor < Thor
|
28
|
-
include Masamune::Thor
|
29
|
-
include Masamune::Actions::ElasticMapreduce
|
30
|
-
|
31
|
-
# FIXME need to add an unnecessary namespace until this issue is fixed:
|
32
|
-
# https://github.com/wycats/thor/pull/247
|
33
|
-
namespace :elastic_mapreduce
|
34
|
-
skip_lock!
|
35
|
-
|
36
|
-
desc 'elastic_mapreduce', 'Launch an ElasticMapReduce ssh session'
|
37
|
-
class_option :template, :type => :string, :aliases => '-t', :desc => 'Execute named template command'
|
38
|
-
class_option :params, :type => :hash, :aliases => '-p', :desc => 'Bind params to named template command', :default => {}
|
39
|
-
def elastic_mapreduce_exec
|
40
|
-
elastic_mapreduce_options = options.dup.with_indifferent_access
|
41
|
-
elastic_mapreduce_options.merge!(interactive: true)
|
42
|
-
elastic_mapreduce_options.merge!(extra: extra_or_ssh)
|
43
|
-
elastic_mapreduce(elastic_mapreduce_options)
|
44
|
-
end
|
45
|
-
default_task :elastic_mapreduce_exec
|
46
|
-
|
47
|
-
no_tasks do
|
48
|
-
after_initialize(:first) do |thor, options|
|
49
|
-
begin
|
50
|
-
thor.extra += thor.configuration.bind_template(:elastic_mapreduce, options[:template], options[:params]) if options[:template]
|
51
|
-
rescue ArgumentError => e
|
52
|
-
raise ::Thor::MalformattedArgumentError, e.to_s
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def extra_or_ssh
|
57
|
-
self.extra.any? ? self.extra : ['--ssh']
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# The MIT License (MIT)
|
2
|
-
#
|
3
|
-
# Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require 'masamune/tasks/elastic_mapreduce_thor'
|
24
|
-
|
25
|
-
describe Masamune::Tasks::ElasticMapreduceThor do
|
26
|
-
context 'with help command ' do
|
27
|
-
let(:command) { 'help' }
|
28
|
-
it_behaves_like 'command usage'
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'with -j' do
|
32
|
-
let(:options) { ['-j', 'j-XYZ'] }
|
33
|
-
it do
|
34
|
-
expect_any_instance_of(described_class).to receive(:elastic_mapreduce).with(hash_including(jobflow: 'j-XYZ', extra: ['--ssh'])).once.and_return(mock_success)
|
35
|
-
cli_invocation
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
context 'with --jobflow' do
|
40
|
-
let(:options) { ['--jobflow=j-XYZ'] }
|
41
|
-
it do
|
42
|
-
expect_any_instance_of(described_class).to receive(:elastic_mapreduce).with(hash_including(jobflow: 'j-XYZ', extra: ['--ssh'])).once.and_return(mock_success)
|
43
|
-
cli_invocation
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
context 'with -- --list' do
|
48
|
-
let(:options) { ['--', '--list'] }
|
49
|
-
it do
|
50
|
-
expect_any_instance_of(described_class).to receive(:elastic_mapreduce).with(hash_including(extra: ['--list'])).once.and_return(mock_success)
|
51
|
-
cli_invocation
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|