Search in sources :

Example 61 with RowDataPacket

use of com.alibaba.cobar.net.mysql.RowDataPacket in project cobar by alibaba.

the class ShowCobarCluster method getRow.

private static RowDataPacket getRow(CobarNode node, String charset) {
    CobarNodeConfig conf = node.getConfig();
    RowDataPacket row = new RowDataPacket(FIELD_COUNT);
    row.add(StringUtil.encode(conf.getHost(), charset));
    row.add(IntegerUtil.toBytes(conf.getWeight()));
    return row;
}
Also used : RowDataPacket(com.alibaba.cobar.net.mysql.RowDataPacket) CobarNodeConfig(com.alibaba.cobar.config.model.CobarNodeConfig)

Aggregations

RowDataPacket (com.alibaba.cobar.net.mysql.RowDataPacket)61 ByteBuffer (java.nio.ByteBuffer)38 EOFPacket (com.alibaba.cobar.net.mysql.EOFPacket)37 FieldPacket (com.alibaba.cobar.net.mysql.FieldPacket)37 CobarConfig (com.alibaba.cobar.CobarConfig)7 MySQLDataNode (com.alibaba.cobar.mysql.MySQLDataNode)6 NIOProcessor (com.alibaba.cobar.net.NIOProcessor)6 MySQLDataSource (com.alibaba.cobar.mysql.MySQLDataSource)5 SchemaConfig (com.alibaba.cobar.config.model.SchemaConfig)4 SQLRecord (com.alibaba.cobar.statistic.SQLRecord)3 ArrayList (java.util.ArrayList)3 CobarNode (com.alibaba.cobar.CobarNode)2 DataSourceConfig (com.alibaba.cobar.config.model.DataSourceConfig)2 CobarHeartbeat (com.alibaba.cobar.heartbeat.CobarHeartbeat)2 MySQLHeartbeat (com.alibaba.cobar.heartbeat.MySQLHeartbeat)2 FrontendConnection (com.alibaba.cobar.net.FrontendConnection)2 ResultSetHeaderPacket (com.alibaba.cobar.net.mysql.ResultSetHeaderPacket)2 LinkedList (java.util.LinkedList)2 TreeSet (java.util.TreeSet)2 CobarCluster (com.alibaba.cobar.CobarCluster)1