Search in sources :

Example 26 with ErrorPacket

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

the class MySQLDetectorHandler method handleErrorPacket.

/**
 * ERROR数据包处理
 */
private void handleErrorPacket(byte[] data) {
    ErrorPacket err = new ErrorPacket();
    err.read(data);
    throw new HeartbeatException(new String(err.message));
}
Also used : ErrorPacket(com.alibaba.cobar.net.mysql.ErrorPacket) HeartbeatException(com.alibaba.cobar.exception.HeartbeatException)

Aggregations

ErrorPacket (com.alibaba.cobar.net.mysql.ErrorPacket)26 ErrorPacketException (com.alibaba.cobar.exception.ErrorPacketException)6 UnknownPacketException (com.alibaba.cobar.exception.UnknownPacketException)6 BinaryPacket (com.alibaba.cobar.net.mysql.BinaryPacket)6 CommandPacket (com.alibaba.cobar.net.mysql.CommandPacket)4 HandshakePacket (com.alibaba.cobar.net.mysql.HandshakePacket)4 ServerConnection (com.alibaba.cobar.server.ServerConnection)4 HeartbeatException (com.alibaba.cobar.exception.HeartbeatException)2 UnknownCharsetException (com.alibaba.cobar.exception.UnknownCharsetException)1 UnknownDataNodeException (com.alibaba.cobar.exception.UnknownDataNodeException)1 HeartbeatPacket (com.alibaba.cobar.net.mysql.HeartbeatPacket)1 OkPacket (com.alibaba.cobar.net.mysql.OkPacket)1 Reply323Packet (com.alibaba.cobar.net.mysql.Reply323Packet)1 IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1