Example #1
0
        public void ShouldNotSerializeSqoopJobName()
        {
            var sqoopJob = new SqoopJobCreateParameters();

            sqoopJob.Command = "show tables";

            var payloadConverter = new PayloadConverterBase();
            var payload          = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob);

            Assert.IsFalse((payload.Contains(WebHCatConstants.DefineJobName)));
        }
Example #2
0
        public void CanSerializeValidSqoopJobRequest_File()
        {
            var sqoopJob = new SqoopJobCreateParameters()
            {
                File = "file.sqoop"
            };

            var payloadConverter = new PayloadConverterBase();
            var payload          = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob);

            Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.File, Uri.EscapeDataString(sqoopJob.File))));
        }
Example #3
0
        public void CanSerializeValidSqoopJobRequest_Command()
        {
            var sqoopJob = new SqoopJobCreateParameters()
            {
                Command = "show tables"
            };

            var payloadConverter = new PayloadConverterBase();
            var payload          = payloadConverter.SerializeSqoopRequest("hadoop", sqoopJob);

            Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.Command, Uri.EscapeDataString(sqoopJob.Command))));
        }