protected override void BeginWork() { base.BeginWork(); _jobParameter = (NearDuplicationJobBEO)XmlUtility.DeserializeObject(BootParameters, typeof(NearDuplicationJobBEO)); #region Assertion _jobParameter.DatasetId.ShouldBeGreaterThan(0); _jobParameter.MatterId.ShouldBeGreaterThan(0); _jobParameter.CollectionId.ShouldNotBeEmpty(); // _jobParameter.JobName.ShouldNotBeEmpty(); #endregion _ingestionId = string.Format("{0}_Dataset-{1}_RunId-{2}", _jobParameter.JobName, _jobParameter.DatasetId, PipelineId); _familyThreshHold = ((_jobParameter.FamilyThreshold > 0) ? (byte)_jobParameter.FamilyThreshold : Constants.NearDuplicationFamilyThresholdDefaultValue); _clusterThreshHold = ((_jobParameter.ClusterThreshold > 0) ? (byte)_jobParameter.ClusterThreshold : Constants.NearDuplicationClusterThresholdDefaultValue); //Get Vault Database Connection string var documentVaultManager = new DocumentVaultManager(); _connectionString = documentVaultManager.GetConnectionStringForMatter(_jobParameter.MatterId); //Get Polaris license server IP address _licenseServer = CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.NearDuplicationPolarisLicenseKeyName); }
protected override void BeginWork() { base.BeginWork(); _jobParameter = (NearDuplicationJobBEO) XmlUtility.DeserializeObject(BootParameters, typeof (NearDuplicationJobBEO)); #region Assertion _jobParameter.DatasetId.ShouldBeGreaterThan(0); _jobParameter.MatterId.ShouldBeGreaterThan(0); _jobParameter.CollectionId.ShouldNotBeEmpty(); // _jobParameter.JobName.ShouldNotBeEmpty(); #endregion _ingestionId = string.Format("{0}_Dataset-{1}_RunId-{2}", _jobParameter.JobName, _jobParameter.DatasetId, PipelineId); _familyThreshHold = ((_jobParameter.FamilyThreshold > 0) ? (byte) _jobParameter.FamilyThreshold : Constants.NearDuplicationFamilyThresholdDefaultValue); _clusterThreshHold = ((_jobParameter.ClusterThreshold > 0) ? (byte) _jobParameter.ClusterThreshold : Constants.NearDuplicationClusterThresholdDefaultValue); //Get Vault Database Connection string var documentVaultManager = new DocumentVaultManager(); _connectionString = documentVaultManager.GetConnectionStringForMatter(_jobParameter.MatterId); //Get Polaris license server IP address _licenseServer = CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.NearDuplicationPolarisLicenseKeyName); }
protected override void BeginWork() { base.BeginWork(); _jobParameter = (NearDuplicationJobBEO)XmlUtility.DeserializeObject(BootParameters, typeof(NearDuplicationJobBEO)); #region "Assertion" _jobParameter.DatasetId.ShouldBeGreaterThan(0); _jobParameter.MatterId.ShouldBeGreaterThan(0); _jobParameter.CollectionId.ShouldNotBeEmpty(); // _jobParameter.JobName.ShouldNotBeEmpty(); #endregion _ingestionId = string.Format("{0}_Dataset-{1}_RunId-{2}", _jobParameter.JobName, _jobParameter.DatasetId, PipelineId); var familyThreshHold = ((_jobParameter.FamilyThreshold > 0) ? (byte)_jobParameter.FamilyThreshold : Constants.NearDuplicationFamilyThresholdDefaultValue); var clusterThreshHold = ((_jobParameter.ClusterThreshold > 0) ? (byte)_jobParameter.ClusterThreshold : Constants.NearDuplicationClusterThresholdDefaultValue); //Get Vault Database Connection string var documentVaultManager = new DocumentVaultManager(); _connectionString = documentVaultManager.GetConnectionStringForMatter(_jobParameter.MatterId); //Get Dataset details _dataset = DataSetBO.GetDataSetDetailForDataSetId(_jobParameter.DatasetId); _dataset.ShouldNotBe(null); //Get Polaris license server IP address var licenseServer = CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.NearDuplicationPolarisLicenseKeyName); try { //Initialize Near Dupe Adapter _nearDuplicationAdapter = new EVPolarisNearDuplicationAdapter(); _nearDuplicationAdapter.InitializeAdapter(_connectionString, _ingestionId, licenseServer, clusterThreshHold, familyThreshHold); } catch (Exception ex) { Tracer.Error( "Near Duplication Start Up Worker: Failed to initialize Near duplication engine for job run id:{0}, exception:{1}", PipelineId, ex); throw; } // _nearDuplicationAdapter.DeleteAllData(); }
protected override void BeginWork() { base.BeginWork(); _jobParameter = (NearDuplicationJobBEO) XmlUtility.DeserializeObject(BootParameters, typeof (NearDuplicationJobBEO)); #region "Assertion" _jobParameter.DatasetId.ShouldBeGreaterThan(0); _jobParameter.MatterId.ShouldBeGreaterThan(0); _jobParameter.CollectionId.ShouldNotBeEmpty(); // _jobParameter.JobName.ShouldNotBeEmpty(); #endregion _ingestionId = string.Format("{0}_Dataset-{1}_RunId-{2}", _jobParameter.JobName, _jobParameter.DatasetId, PipelineId); var familyThreshHold = ((_jobParameter.FamilyThreshold > 0) ? (byte) _jobParameter.FamilyThreshold : Constants.NearDuplicationFamilyThresholdDefaultValue); var clusterThreshHold = ((_jobParameter.ClusterThreshold > 0) ? (byte) _jobParameter.ClusterThreshold : Constants.NearDuplicationClusterThresholdDefaultValue); //Get Vault Database Connection string var documentVaultManager = new DocumentVaultManager(); _connectionString = documentVaultManager.GetConnectionStringForMatter(_jobParameter.MatterId); //Get Dataset details _dataset= DataSetBO.GetDataSetDetailForDataSetId(_jobParameter.DatasetId); _dataset.ShouldNotBe(null); //Get Polaris license server IP address var licenseServer = CmgServiceConfigBO.GetServiceConfigurationsforConfig(Constants.NearDuplicationPolarisLicenseKeyName); try { //Initialize Near Dupe Adapter _nearDuplicationAdapter = new EVPolarisNearDuplicationAdapter(); _nearDuplicationAdapter.InitializeAdapter(_connectionString, _ingestionId, licenseServer, clusterThreshHold, familyThreshHold); } catch (Exception ex) { Tracer.Error( "Near Duplication Start Up Worker: Failed to initialize Near duplication engine for job run id:{0}, exception:{1}", PipelineId, ex); throw; } // _nearDuplicationAdapter.DeleteAllData(); }