Tabnine Logo
FlowConfigClient.getFlowConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
getFlowConfig
method
in
org.apache.gobblin.service.FlowConfigClient

Best Java code snippets using org.apache.gobblin.service.FlowConfigClient.getFlowConfig (Showing top 15 results out of 315)

origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testBadGet")
public void testBadDelete() throws Exception {
 logger.info("+++++++++++++++++++ testBadDelete START");
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME_1).setFlowName(TEST_DUMMY_FLOW_NAME_1);
 try {
  this.node1FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have raised a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 try {
  this.node2FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have raised a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 logger.info("+++++++++++++++++++ testBadDelete END");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testDelete")
public void testBadGet() throws Exception {
 logger.info("+++++++++++++++++++ testBadGet START");
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME_1).setFlowName(TEST_DUMMY_FLOW_NAME_1);
 try {
  this.node1FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have raised a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 try {
  this.node2FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have raised a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 logger.info("+++++++++++++++++++ testBadGet END");
}
origin: apache/incubator-gobblin

@Test
public void testBadDelete() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME).setFlowName(TEST_DUMMY_FLOW_NAME);
 try {
  this.flowConfigClient.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
  return;
 }
 Assert.fail("Get should have raised a 404 error");
}
origin: apache/incubator-gobblin

@Test
public void testBadGet() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME).setFlowName(TEST_DUMMY_FLOW_NAME);
 try {
  this.flowConfigClient.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
  return;
 }
 Assert.fail("Get should have raised a 404 error");
}
origin: apache/incubator-gobblin

@Test
public void testBadGet() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME).setFlowName(TEST_DUMMY_FLOW_NAME);
 try {
  _client.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.S_404_NOT_FOUND.getCode());
  return;
 }
 Assert.fail("Get should have raised a 404 error");
}
origin: apache/incubator-gobblin

@Test
public void testBadDelete() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_DUMMY_GROUP_NAME).setFlowName(TEST_DUMMY_FLOW_NAME);
 try {
  _client.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.S_404_NOT_FOUND.getCode());
  return;
 }
 Assert.fail("Get should have raised a 404 error");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testUpdate")
public void testDelete() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 // make sure flow config exists
 FlowConfig flowConfig = this.flowConfigClient.getFlowConfig(flowId);
 Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 this.flowConfigClient.deleteFlowConfig(flowId);
 try {
  this.flowConfigClient.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
  return;
 }
 Assert.fail("Get should have gotten a 404 error");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testUpdate")
public void testDelete() throws Exception {
 logger.info("+++++++++++++++++++ testDelete START");
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME_1).setFlowName(TEST_FLOW_NAME_1);
 // make sure flow config exists
 FlowConfig flowConfig = this.node1FlowConfigClient.getFlowConfig(flowId);
 Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME_1);
 Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME_1);
 this.node1FlowConfigClient.deleteFlowConfig(flowId);
 // Check if deletion is reflected on both nodes
 try {
  this.node1FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have gotten a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 try {
  this.node2FlowConfigClient.getFlowConfig(flowId);
  Assert.fail("Get should have gotten a 404 error");
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.NOT_FOUND_404);
 }
 logger.info("+++++++++++++++++++ testDelete END");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testUpdate")
public void testDelete() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 // make sure flow config exists
 FlowConfig flowConfig = _client.getFlowConfig(flowId);
 Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 _client.deleteFlowConfig(flowId);
 try {
  _client.getFlowConfig(flowId);
 } catch (RestLiResponseException e) {
  Assert.assertEquals(e.getStatus(), HttpStatus.S_404_NOT_FOUND.getCode());
  return;
 }
 Assert.fail("Get should have gotten a 404 error");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testCreateAgain")
public void testGet() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 FlowConfig flowConfig = _client.getFlowConfig(flowId);
 Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 Assert.assertEquals(flowConfig.getSchedule().getCronSchedule(), TEST_SCHEDULE );
 Assert.assertEquals(flowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
 Assert.assertFalse(flowConfig.getSchedule().isRunImmediately());
 // Add this asssert back when getFlowSpec() is changed to return the raw flow spec
 //Assert.assertEquals(flowConfig.getProperties().size(), 1);
 Assert.assertEquals(flowConfig.getProperties().get("param1"), "value1");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testCreateAgain")
public void testGet() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 FlowConfig flowConfig = this.flowConfigClient.getFlowConfig(flowId);
 Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 Assert.assertEquals(flowConfig.getSchedule().getCronSchedule(), TEST_SCHEDULE);
 Assert.assertEquals(flowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
 Assert.assertFalse(flowConfig.getSchedule().isRunImmediately());
 // Add this assert back when getFlowSpec() is changed to return the raw flow spec
 //Assert.assertEquals(flowConfig.getProperties().size(), 1);
 Assert.assertEquals(flowConfig.getProperties().get("param1"), "value1");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testCreateAgain")
public void testGet() throws Exception {
 logger.info("+++++++++++++++++++ testGet START");
 FlowId flowId1 = new FlowId().setFlowGroup(TEST_GROUP_NAME_1).setFlowName(TEST_FLOW_NAME_1);
 FlowConfig flowConfig1 = this.node1FlowConfigClient.getFlowConfig(flowId1);
 Assert.assertEquals(flowConfig1.getId().getFlowGroup(), TEST_GROUP_NAME_1);
 Assert.assertEquals(flowConfig1.getId().getFlowName(), TEST_FLOW_NAME_1);
 Assert.assertEquals(flowConfig1.getSchedule().getCronSchedule(), TEST_SCHEDULE_1);
 Assert.assertEquals(flowConfig1.getTemplateUris(), TEST_TEMPLATE_URI_1);
 Assert.assertTrue(flowConfig1.getSchedule().isRunImmediately());
 Assert.assertEquals(flowConfig1.getProperties().get("param1"), "value1");
 flowConfig1 = this.node2FlowConfigClient.getFlowConfig(flowId1);
 Assert.assertEquals(flowConfig1.getId().getFlowGroup(), TEST_GROUP_NAME_1);
 Assert.assertEquals(flowConfig1.getId().getFlowName(), TEST_FLOW_NAME_1);
 Assert.assertEquals(flowConfig1.getSchedule().getCronSchedule(), TEST_SCHEDULE_1);
 Assert.assertEquals(flowConfig1.getTemplateUris(), TEST_TEMPLATE_URI_1);
 Assert.assertTrue(flowConfig1.getSchedule().isRunImmediately());
 Assert.assertEquals(flowConfig1.getProperties().get("param1"), "value1");
 logger.info("+++++++++++++++++++ testGet END");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testGet")
public void testUpdate() throws Exception {
 logger.info("+++++++++++++++++++ testUpdate START");
 // Update on one node and retrieve from another
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME_1).setFlowName(TEST_FLOW_NAME_1);
 Map<String, String> flowProperties = Maps.newHashMap();
 flowProperties.put("param1", "value1b");
 flowProperties.put("param2", "value2b");
 flowProperties.put(ServiceConfigKeys.FLOW_SOURCE_IDENTIFIER_KEY, TEST_SOURCE_NAME);
 flowProperties.put(ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY, TEST_SINK_NAME);
 FlowConfig flowConfig = new FlowConfig()
   .setId(new FlowId().setFlowGroup(TEST_GROUP_NAME_1).setFlowName(TEST_FLOW_NAME_1))
   .setTemplateUris(TEST_TEMPLATE_URI_1).setSchedule(new Schedule().setCronSchedule(TEST_SCHEDULE_1))
   .setProperties(new StringMap(flowProperties));
 this.node1FlowConfigClient.updateFlowConfig(flowConfig);
 FlowConfig retrievedFlowConfig = this.node2FlowConfigClient.getFlowConfig(flowId);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowGroup(), TEST_GROUP_NAME_1);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowName(), TEST_FLOW_NAME_1);
 Assert.assertEquals(retrievedFlowConfig.getSchedule().getCronSchedule(), TEST_SCHEDULE_1);
 Assert.assertEquals(retrievedFlowConfig.getTemplateUris(), TEST_TEMPLATE_URI_1);
 Assert.assertFalse(retrievedFlowConfig.getSchedule().isRunImmediately());
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param1"), "value1b");
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param2"), "value2b");
 logger.info("+++++++++++++++++++ testUpdate END");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testGet")
public void testUpdate() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 Map<String, String> flowProperties = Maps.newHashMap();
 flowProperties.put("param1", "value1b");
 flowProperties.put("param2", "value2b");
 flowProperties.put(ServiceConfigKeys.FLOW_SOURCE_IDENTIFIER_KEY, TEST_SOURCE_NAME);
 flowProperties.put(ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY, TEST_SINK_NAME);
 FlowConfig flowConfig = new FlowConfig().setId(new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME))
   .setTemplateUris(TEST_TEMPLATE_URI).setSchedule(new Schedule().setCronSchedule(TEST_SCHEDULE))
   .setProperties(new StringMap(flowProperties));
 this.flowConfigClient.updateFlowConfig(flowConfig);
 FlowConfig retrievedFlowConfig = this.flowConfigClient.getFlowConfig(flowId);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 Assert.assertEquals(retrievedFlowConfig.getSchedule().getCronSchedule(), TEST_SCHEDULE);
 Assert.assertEquals(retrievedFlowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
 // Add this asssert when getFlowSpec() is changed to return the raw flow spec
 //Assert.assertEquals(flowConfig.getProperties().size(), 2);
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param1"), "value1b");
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param2"), "value2b");
}
origin: apache/incubator-gobblin

@Test (dependsOnMethods = "testGet")
public void testUpdate() throws Exception {
 FlowId flowId = new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME);
 Map<String, String> flowProperties = Maps.newHashMap();
 flowProperties.put("param1", "value1b");
 flowProperties.put("param2", "value2b");
 FlowConfig flowConfig = new FlowConfig().setId(new FlowId().setFlowGroup(TEST_GROUP_NAME).setFlowName(TEST_FLOW_NAME))
   .setTemplateUris(TEST_TEMPLATE_URI).setSchedule(new Schedule().setCronSchedule(TEST_SCHEDULE))
   .setProperties(new StringMap(flowProperties));
 _client.updateFlowConfig(flowConfig);
 FlowConfig retrievedFlowConfig = _client.getFlowConfig(flowId);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
 Assert.assertEquals(retrievedFlowConfig.getId().getFlowName(), TEST_FLOW_NAME);
 Assert.assertEquals(retrievedFlowConfig.getSchedule().getCronSchedule(), TEST_SCHEDULE );
 Assert.assertEquals(retrievedFlowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
 // Add this asssert when getFlowSpec() is changed to return the raw flow spec
 //Assert.assertEquals(flowConfig.getProperties().size(), 2);
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param1"), "value1b");
 Assert.assertEquals(retrievedFlowConfig.getProperties().get("param2"), "value2b");
}
org.apache.gobblin.serviceFlowConfigClientgetFlowConfig

Javadoc

Get a flow configuration

Popular methods of FlowConfigClient

  • <init>
    Construct a FlowConfigClient to communicate with http flow config server at URI serverUri
  • createFlowConfig
    Create a flow configuration
  • deleteFlowConfig
    Delete a flow configuration
  • updateFlowConfig
    Update a flow configuration
  • close

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now