-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for cluster can acquire multi be in same host and fixed some issues #47
Changes from 7 commits
f52ea6d
843855e
9971417
c632137
e5d4105
9ded63a
cfdd8f8
69aec04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2017 The Apache Software Foundation | ||
// Modifications copyright (C) 2017, Baidu.com, Inc. | ||
|
||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
package com.baidu.palo.analysis; | ||
|
||
import com.baidu.palo.catalog.Column; | ||
import com.baidu.palo.catalog.ColumnType; | ||
import com.baidu.palo.common.proc.BackendsProcDir; | ||
import com.baidu.palo.qe.ShowResultSetMetaData; | ||
|
||
public class ShowBackendsStmt extends ShowStmt { | ||
|
||
public ShowBackendsStmt() { | ||
} | ||
|
||
@Override | ||
public ShowResultSetMetaData getMetaData() { | ||
ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder(); | ||
for (String title : BackendsProcDir.TITLE_NAMES) { | ||
if (title.equals("HostName") || title.equals("HeartbeatPort") | ||
|| title.equals("BePort") || title.equals("HttpPort")) { | ||
continue; | ||
} | ||
builder.addColumn(new Column(title, ColumnType.createVarchar(30))); | ||
} | ||
return builder.build(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个为什么不写成静态对象呢?每次生成的不是一样的么? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里用其他地方的静态对象生成的,避免重复吧。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个没啥重复的吧?因为你每次build出来的内容都一样,那么写成一个静态的对象直接返回是没问题的 |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个Licence写的有问题,需要改下