@Override
    public TSetConfigResponse setConfig(TSetConfigRequest request) throws TException {
        try {
            Preconditions.checkState(request.getKeys().size() == request.getValues().size());
            Map<String, String> configs = new HashMap<>();
            for (int i = 0; i < request.getKeys().size(); i++) {
                String key = request.getKeys().get(i);
                String value = request.getValues().get(i);
                configs.put(key, value);
                if ("mysql_server_version".equalsIgnoreCase(key)) {
                    if (!Strings.isNullOrEmpty(value)) {
                        GlobalVariable.version = value;
                    }
                }
            }

            GlobalStateMgr.getCurrentState().getNodeMgr().setFrontendConfig(configs);
            return new TSetConfigResponse(new TStatus(TStatusCode.OK));
        } catch (DdlException e) {
            TStatus status = new TStatus(TStatusCode.INTERNAL_ERROR);
            status.setError_msgs(Lists.newArrayList(e.getMessage()));
            return new TSetConfigResponse(status);
        }
    }
@Test
    public void testSetFrontendConfig() throws TException {
        FrontendServiceImpl impl = new FrontendServiceImpl(exeEnv);
        TSetConfigRequest request = new TSetConfigRequest();
        request.keys = Lists.newArrayList("mysql_server_version");
        request.values = Lists.newArrayList("5.1.1");

        TSetConfigResponse result = impl.setConfig(request);
        Assert.assertEquals("5.1.1", GlobalVariable.version);
    }