@Test public void partitionGroup() throws Exception{ TopicAdmin.PartitionGroupArg arg=new TopicAdmin.PartitionGroupArg(); arg.topic=topic; String partitionGroups=client.partitionGroup(arg); List<PartitionGroup> partitionGroupList=JSON.parseArray(partitionGroups,PartitionGroup.class); Assert.assertNotEquals(null,partitionGroupList); System.out.println(partitionGroupList); }
@Override public String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg) throws Exception { partitionGroupArg.host=host; try { String result= topicAdmin.partitionGroups(partitionGroupArg,null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } }
AdminClient implements NsrAdmin { @Override public String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg) throws Exception { partitionGroupArg.host=host; try { String result= topicAdmin.partitionGroups(partitionGroupArg,null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } } }
AdminClient implements NsrAdmin { @Override public String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg) throws Exception { partitionGroupArg.host=host; try { String result= topicAdmin.partitionGroups(partitionGroupArg,null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } } AdminClient(String connectionStr); }
AdminClient implements NsrAdmin { @Override public String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg) throws Exception { partitionGroupArg.host=host; try { String result= topicAdmin.partitionGroups(partitionGroupArg,null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } } AdminClient(String connectionStr); @Override String publish(TopicAdmin.PublishArg pubSubArg); @Override String subscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String unPublish(TopicAdmin.PublishArg pubSubArg); @Override String unSubscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String delTopic(TopicAdmin.TopicArg topicArg); @Override String createTopic(TopicAdmin.TopicArg topicArg); @Override String token(AppAdmin.TokenArg tokenArg); @Override List<AppToken> tokens(AppAdmin.TokensArg tokensArg); @Override List<Broker> listBroker(BrokerAdmin.ListArg listArg); @Override String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg); void onException(); @Override void close(); }
AdminClient implements NsrAdmin { @Override public String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg) throws Exception { partitionGroupArg.host=host; try { String result= topicAdmin.partitionGroups(partitionGroupArg,null); hostProvider.onConnected(); return result; }catch (Exception e){ onException(); logger.info("request exception",e); throw e; } } AdminClient(String connectionStr); @Override String publish(TopicAdmin.PublishArg pubSubArg); @Override String subscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String unPublish(TopicAdmin.PublishArg pubSubArg); @Override String unSubscribe(TopicAdmin.SubscribeArg pubSubArg); @Override String delTopic(TopicAdmin.TopicArg topicArg); @Override String createTopic(TopicAdmin.TopicArg topicArg); @Override String token(AppAdmin.TokenArg tokenArg); @Override List<AppToken> tokens(AppAdmin.TokensArg tokensArg); @Override List<Broker> listBroker(BrokerAdmin.ListArg listArg); @Override String partitionGroup(TopicAdmin.PartitionGroupArg partitionGroupArg); void onException(); @Override void close();  }