You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by sn...@apache.org on 2019/04/12 18:17:34 UTC

[incubator-pinot] branch master updated: Fix AddTenantCommand bug for posting tenant config (#4108)

This is an automated email from the ASF dual-hosted git repository.

snlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new a5777cd  Fix AddTenantCommand bug for posting tenant config (#4108)
a5777cd is described below

commit a5777cd1a108f9f7bf52feedcb6570cdb2ac6f0d
Author: Seunghyun Lee <sn...@linkedin.com>
AuthorDate: Fri Apr 12 11:17:29 2019 -0700

    Fix AddTenantCommand bug for posting tenant config (#4108)
---
 .../java/org/apache/pinot/tools/admin/command/AddTenantCommand.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/AddTenantCommand.java b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/AddTenantCommand.java
index 0c32f9c..ba1232e 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/AddTenantCommand.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/AddTenantCommand.java
@@ -19,6 +19,7 @@
 package org.apache.pinot.tools.admin.command;
 
 import org.apache.pinot.common.config.Tenant;
+import org.apache.pinot.common.utils.JsonUtils;
 import org.apache.pinot.common.utils.NetUtil;
 import org.apache.pinot.common.utils.TenantRole;
 import org.apache.pinot.controller.helix.ControllerRequestURLBuilder;
@@ -116,7 +117,8 @@ public class AddTenantCommand extends AbstractBaseAdminCommand implements Comman
         .setOfflineInstances(_offlineInstanceCount).setRealtimeInstances(_realtimeInstanceCount).build();
 
     String res = AbstractBaseAdminCommand
-        .sendPostRequest(ControllerRequestURLBuilder.baseUrl(_controllerAddress).forTenantCreate(), t.toString());
+        .sendPostRequest(ControllerRequestURLBuilder.baseUrl(_controllerAddress).forTenantCreate(),
+            JsonUtils.objectToString(t));
 
     LOGGER.info(res);
     System.out.print(res);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org