Пример #1
0
        public void CanConvertAdlsGen2Cluster()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.DefaultStorageInfo = new AzureDataLakeStoreGen2Info("adlsGen2StorageAccount", "key", "fileSystem");
            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #2
0
        public void CanConvertMLServicesCluster()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.ClusterType = "MlServicEs";
            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #3
0
        public void CanConvertRServerCluster()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.ClusterType = "RsErVeR";
            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #4
0
        public void CanConvertSandboxCluster()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.ClusterType = "SaNdBoX";
            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #5
0
        public void CanConvertHadoopClusterWithCustomVnet()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.VirtualNetworkId = "vnetId";
            createParams.SubnetName       = "subnet";
            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #6
0
        public void CanConvertHadoopClusterWithCustomMetastoresToMarchSpec()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.HiveMetastore  = new Metastore("server.database.windows.net", "hiveDb", "username", "password");
            createParams.OozieMetastore = new Metastore("server.database.windows.net", "oozieDb", "username", "password");

            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #7
0
        public void CantConvertHadoopClusterWithCustomMetastoresToMarchSpecWithConfigurations()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            createParams.HiveMetastore  = new Metastore("server.database.windows.net", "hiveDb", "username", "password");
            createParams.OozieMetastore = new Metastore("server.database.windows.net", "oozieDb", "username", "password");
            Dictionary <string, string> testConfig = new Dictionary <string, string>
            {
                { Constants.MetastoreConfigurations.HiveSite.ConnectionUrlKey, "test" }
            };

            createParams.Configurations.Add(ConfigurationKey.HiveSite, testConfig);

            ArgumentException ex = Assert.Throws <ArgumentException>(() =>
            {
                ExtendedParameterValidators.ValidateSpecConversion(createParams);
            });

            Assert.Contains(Constants.MetastoreConfigurations.HiveSite.ConnectionUrlKey, ex.Message);
        }
Пример #8
0
        public void CanConvertHadoopClusterWithScriptActions()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();
            Dictionary <ClusterNodeType, List <ScriptAction> > scriptActions = new Dictionary <ClusterNodeType, List <ScriptAction> >
            {
                {
                    ClusterNodeType.WorkerNode, new List <ScriptAction>
                    {
                        new ScriptAction {
                            Name = "scriptAction1", Parameters = "params1", Uri = "http://foo.bar"
                        },
                        new ScriptAction {
                            Name = "scriptAction2", Parameters = "params2", Uri = "http://foo.bar"
                        }
                    }
                },
                {
                    ClusterNodeType.HeadNode, new List <ScriptAction>
                    {
                        new ScriptAction {
                            Name = "scriptAction1", Parameters = "params1", Uri = "http://foo.bar"
                        }
                    }
                },
                {
                    ClusterNodeType.ZookeeperNode, new List <ScriptAction>
                    {
                        new ScriptAction {
                            Name = "scriptAction3", Parameters = "params1", Uri = "http://foo.bar"
                        }
                    }
                }
            };

            foreach (KeyValuePair <ClusterNodeType, List <ScriptAction> > kv in scriptActions)
            {
                createParams.ScriptActions.Add(kv.Key, kv.Value);
            }

            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }
Пример #9
0
        public void CanConvertHadoopClusterToMarchSpec()
        {
            ClusterCreateParameters createParams = GetClusterCreateParamsWithMinRequiredValues();

            ExtendedParameterValidators.ValidateSpecConversion(createParams);
        }