masamune 0.15.6 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -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
|
@@ -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
|
data/lib/masamune/version.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
|
@@ -21,5 +21,5 @@
|
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
23
|
module Masamune
|
24
|
-
VERSION = '0.
|
24
|
+
VERSION = '0.16.0'
|
25
25
|
end
|
@@ -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
|
@@ -20,36 +20,34 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
|
-
describe Masamune::Actions::
|
23
|
+
describe Masamune::Actions::AwsEmr do
|
24
24
|
let(:klass) do
|
25
25
|
Class.new do
|
26
26
|
include Masamune::HasEnvironment
|
27
27
|
include Masamune::AfterInitializeCallbacks
|
28
|
-
include Masamune::Actions::
|
28
|
+
include Masamune::Actions::AwsEmr
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
32
|
let(:instance) { klass.new }
|
33
33
|
let(:configuration) { {} }
|
34
|
-
let(:extra) { [] }
|
35
34
|
|
36
35
|
before do
|
37
|
-
allow(instance).to receive_message_chain(:configuration, :
|
38
|
-
allow(instance).to receive(:extra).and_return(extra)
|
36
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return(configuration)
|
39
37
|
end
|
40
38
|
|
41
|
-
describe '.
|
39
|
+
describe '.aws_emr' do
|
42
40
|
before do
|
43
|
-
mock_command(/\
|
41
|
+
mock_command(/\Aaws emr/, mock_success)
|
44
42
|
end
|
45
43
|
|
46
|
-
subject { instance.
|
44
|
+
subject { instance.aws_emr }
|
47
45
|
|
48
46
|
it { is_expected.to be_success }
|
49
47
|
|
50
48
|
context 'with retries and backoff' do
|
51
49
|
before do
|
52
|
-
allow(instance).to receive_message_chain(:configuration, :
|
50
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return(retries: 1, backoff: 10)
|
53
51
|
expect(Masamune::Commands::RetryWithBackoff).to receive(:new).with(anything, hash_including(retries: 1, backoff: 10)).once.and_call_original
|
54
52
|
end
|
55
53
|
|
@@ -68,59 +66,41 @@ describe Masamune::Actions::ElasticMapreduce do
|
|
68
66
|
it { expect { subject }.to_not raise_error }
|
69
67
|
end
|
70
68
|
|
71
|
-
context 'when
|
69
|
+
context 'when cluster_id is missing' do
|
72
70
|
let(:configuration) { {enabled: true} }
|
73
|
-
|
74
|
-
it { expect { subject }.to_not raise_error }
|
75
|
-
end
|
76
|
-
|
77
|
-
context 'when jobflow is missing' do
|
78
|
-
let(:configuration) { {enabled: true} }
|
79
|
-
it { expect { subject }.to raise_error Thor::RequiredArgumentMissingError, /No value provided for required options '--jobflow'/ }
|
71
|
+
it { expect { subject }.to raise_error Thor::RequiredArgumentMissingError, /No value provided for required options '--cluster-id'/ }
|
80
72
|
end
|
81
73
|
|
82
|
-
context 'when
|
74
|
+
context 'when cluster_id is present without initialize' do
|
83
75
|
let(:configuration) { {enabled: true} }
|
84
|
-
let(:options) { {
|
76
|
+
let(:options) { {cluster_id: 'j-XYZ'} }
|
85
77
|
before do
|
86
|
-
expect(instance).to_not receive(:
|
78
|
+
expect(instance).to_not receive(:aws_emr)
|
87
79
|
end
|
88
80
|
it do
|
89
81
|
expect { subject }.to_not raise_error
|
90
|
-
expect(instance.configuration.
|
82
|
+
expect(instance.configuration.aws_emr[:cluster_id]).to eq('j-XYZ')
|
91
83
|
end
|
92
84
|
end
|
93
85
|
|
94
|
-
context 'when
|
86
|
+
context 'when cluster_id does not exist' do
|
95
87
|
let(:configuration) { {enabled: true} }
|
96
|
-
let(:options) { {initialize: true,
|
88
|
+
let(:options) { {initialize: true, cluster_id: 'j-XYZ'} }
|
97
89
|
before do
|
98
|
-
mock_command(/\
|
90
|
+
mock_command(/\Aaws emr/, mock_failure)
|
99
91
|
end
|
100
|
-
it { expect { subject }.to raise_error Thor::RequiredArgumentMissingError, /
|
92
|
+
it { expect { subject }.to raise_error Thor::RequiredArgumentMissingError, /AWS EMR cluster 'j-XYZ' does not exist/ }
|
101
93
|
end
|
102
94
|
|
103
|
-
context 'when
|
95
|
+
context 'when cluster_id exists' do
|
104
96
|
let(:configuration) { {enabled: true} }
|
105
|
-
let(:options) { {initialize: true,
|
106
|
-
before do
|
107
|
-
mock_command(/\Aelastic-mapreduce/, mock_success)
|
108
|
-
end
|
109
|
-
it do
|
110
|
-
expect { subject }.to_not raise_error
|
111
|
-
expect(instance.configuration.elastic_mapreduce[:jobflow]).to eq('j-XYZ')
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
context 'when jobflow is symbolic' do
|
116
|
-
let(:configuration) { {enabled: true, jobflows: {'build' => 'j-XYZ'}} }
|
117
|
-
let(:options) { {initialize: true, jobflow: 'build', } }
|
97
|
+
let(:options) { {initialize: true, cluster_id: 'j-XYZ'} }
|
118
98
|
before do
|
119
|
-
mock_command(/\
|
99
|
+
mock_command(/\Aaws emr/, mock_success)
|
120
100
|
end
|
121
101
|
it do
|
122
102
|
expect { subject }.to_not raise_error
|
123
|
-
expect(instance.configuration.
|
103
|
+
expect(instance.configuration.aws_emr[:cluster_id]).to eq('j-XYZ')
|
124
104
|
end
|
125
105
|
end
|
126
106
|
end
|
@@ -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
|
@@ -38,7 +38,7 @@ describe Masamune::Actions::HadoopStreaming do
|
|
38
38
|
describe '.hadoop_streaming' do
|
39
39
|
before do
|
40
40
|
allow(instance).to receive_message_chain(:configuration, :hadoop_streaming).and_return({})
|
41
|
-
allow(instance).to receive_message_chain(:configuration, :
|
41
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return({})
|
42
42
|
mock_command(/\Ahadoop/, mock_success)
|
43
43
|
end
|
44
44
|
|
@@ -46,24 +46,24 @@ describe Masamune::Actions::HadoopStreaming do
|
|
46
46
|
|
47
47
|
it { is_expected.to be_success }
|
48
48
|
|
49
|
-
context 'with
|
49
|
+
context 'with cluster_id' do
|
50
50
|
before do
|
51
|
-
allow(instance).to receive_message_chain(:configuration, :
|
51
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return(cluster_id: 'j-XYZ')
|
52
52
|
mock_command(/\Ahadoop/, mock_failure)
|
53
|
-
mock_command(/\
|
53
|
+
mock_command(/\Aaws emr/, mock_success, StringIO.new('ssh fakehost exit'))
|
54
54
|
mock_command(/\Assh fakehost hadoop/, mock_success)
|
55
55
|
end
|
56
56
|
|
57
57
|
it { is_expected.to be_success }
|
58
58
|
end
|
59
59
|
|
60
|
-
context 'with
|
60
|
+
context 'with cluster_id and extra' do
|
61
61
|
let(:extra) { ['-D', 'EXTRA'] }
|
62
62
|
|
63
63
|
before do
|
64
|
-
allow(instance).to receive_message_chain(:configuration, :
|
64
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return(cluster_id: 'j-XYZ')
|
65
65
|
mock_command(/\Ahadoop/, mock_failure)
|
66
|
-
mock_command(/\
|
66
|
+
mock_command(/\Aaws emr/, mock_success, StringIO.new('ssh fakehost exit'))
|
67
67
|
mock_command(/\Assh fakehost -D EXTRA hadoop/, mock_failure)
|
68
68
|
mock_command(/\Assh fakehost hadoop .*? -D EXTRA/, mock_success)
|
69
69
|
end
|
@@ -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
|
@@ -36,8 +36,8 @@ describe Masamune::Actions::Hive do
|
|
36
36
|
before do
|
37
37
|
filesystem.add_path(:tmp_dir, File.join(Dir.tmpdir, SecureRandom.hex))
|
38
38
|
allow(instance).to receive(:filesystem) { filesystem }
|
39
|
-
allow(instance).to receive_message_chain(:configuration, :elastic_mapreduce).and_return({})
|
40
39
|
allow(instance).to receive_message_chain(:configuration, :hive).and_return(configuration)
|
40
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return({})
|
41
41
|
allow(instance).to receive_message_chain(:define_schema, :to_file) { 'schema.hql' }
|
42
42
|
allow_any_instance_of(Masamune::MockFilesystem).to receive(:copy_file_to_dir)
|
43
43
|
end
|
@@ -51,11 +51,11 @@ describe Masamune::Actions::Hive do
|
|
51
51
|
|
52
52
|
it { is_expected.to be_success }
|
53
53
|
|
54
|
-
context 'with
|
54
|
+
context 'with cluster_id' do
|
55
55
|
before do
|
56
|
-
allow(instance).to receive_message_chain(:configuration, :
|
56
|
+
allow(instance).to receive_message_chain(:configuration, :aws_emr).and_return({cluster_id: 'j-XYZ'})
|
57
57
|
mock_command(/\Ahive/, mock_failure)
|
58
|
-
mock_command(/\
|
58
|
+
mock_command(/\Aaws emr/, mock_success, StringIO.new('ssh fakehost exit'))
|
59
59
|
mock_command(/\Assh fakehost hive/, mock_success)
|
60
60
|
end
|
61
61
|
|
@@ -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
|