public void DoesNotAddDefineIfJobNameAbsent() { var hiveJob = new HiveJobCreateParameters() { Query = "show tables" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeHiveRequest("hadoop", hiveJob); Assert.IsFalse(payload.Contains(Uri.EscapeDataString(string.Format("{0}={1}", WebHCatConstants.DefineJobName, hiveJob.JobName)))); }
public void CanSerializeValidHiveJobRequest_WithFile() { var hiveJob = new HiveJobCreateParameters() { File = Constants.WabsProtocolSchemeName + "filepath.hql" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeHiveRequest("hadoop", hiveJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.File, Uri.EscapeDataString(hiveJob.File)))); }
public void PayloadHasEnableLogsFalse() { var hiveJob = new HiveJobCreateParameters() { Query = "show tables" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeHiveRequest("hadoop", hiveJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", HadoopRemoteRestConstants.EnableLogging, "false"))); }
public void CanSerializeValidHiveJobRequest() { var hiveJob = new HiveJobCreateParameters() { Query = "show tables" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeHiveRequest("hadoop", hiveJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", WebHCatConstants.Execute, Uri.EscapeDataString(hiveJob.Query)))); }
public void JobCanSetEnableLogsTrue() { var hiveJob = new HiveJobCreateParameters() { Query = "show tables", EnableTaskLogs = true, StatusFolder = "/showtableslocation" }; var payloadConverter = new PayloadConverterBase(); var payload = payloadConverter.SerializeHiveRequest("hadoop", hiveJob); Assert.IsTrue(payload.Contains(string.Format("{0}={1}", HadoopRemoteRestConstants.EnableLogging, "true"))); }