应用Cassandra补丁时出错

时间:2016-12-19 22:12:22

标签: cassandra

我试图在Cassandra 3.8上应用Cassandra补丁(https://issues.apache.org/jira/browse/CASSANDRA-11569)。我从https://github.com/apache/cassandra/releases/tag/cassandra-3.8下载了源代码当我尝试使用git apply CASSANDRA-11569.patch -v应用修补程序时出现以下错误

Checking patch 

src/java/org/apache/cassandra/metrics/MessagingMetrics.java...
error: src/java/org/apache/cassandra/metrics/MessagingMetrics.java: already exists in working directory
Checking patch src/java/org/apache/cassandra/net/IncomingTcpConnection.java...
error: while searching for:
        else
            id = input.readInt();

        MessageIn message = MessageIn.read(input, version, id, MessageIn.readTimestamp(input));
        if (message == null)
        {
            // callback expired; nothing to do

error: patch failed: src/java/org/apache/cassandra/net/IncomingTcpConnection.java:187
error: src/java/org/apache/cassandra/net/IncomingTcpConnection.java: patch does not apply
Checking patch src/java/org/apache/cassandra/net/MessageIn.java...
error: while searching for:
        return new ConstructionTime();
    }

    public static ConstructionTime readTimestamp(DataInputPlus input) throws IOException
    {
        // make sure to readInt, even if cross_node_to is not enabled
        int partial = input.readInt();
        if(DatabaseDescriptor.hasCrossNodeTimeout())
        {
            long timestamp = System.currentTimeMillis();
            long crossNodeTimestamp = (timestamp & 0xFFFFFFFF00000000L) | (((partial & 0xFFFFFFFFL) << 2) >> 2);
            return new ConstructionTime(crossNodeTimestamp, timestamp != crossNodeTimestamp);
        }
        else

error: patch failed: src/java/org/apache/cassandra/net/MessageIn.java:120
error: src/java/org/apache/cassandra/net/MessageIn.java: patch does not apply
Checking patch src/java/org/apache/cassandra/net/MessagingService.java...
error: while searching for:
import org.apache.cassandra.locator.ILatencySubscriber;
import org.apache.cassandra.metrics.ConnectionMetrics;
import org.apache.cassandra.metrics.DroppedMessageMetrics;
import org.apache.cassandra.repair.messages.RepairMessage;
import org.apache.cassandra.security.SSLFactory;
import org.apache.cassandra.service.*;

error: patch failed: src/java/org/apache/cassandra/net/MessagingService.java:67
error: src/java/org/apache/cassandra/net/MessagingService.java: patch does not apply

有人可以解释这里可能出现的问题吗?

1 个答案:

答案 0 :(得分:4)

您无需将该补丁应用于Cassandra 3.8。 3.8已经应用了补丁。

可以使用org.apache.cassandra.metrics:type=Messaging,name=* mbeans从JMX访问,例如使用SJK

> java -jar sjk.jar mx -s localhost:7199 -mg -all -b org.apache.cassandra.metrics:type=Messaging,name=* -f Mean

org.apache.cassandra.metrics:type=Messaging,name=dc2-Latency
1539.538401853893
org.apache.cassandra.metrics:type=Messaging,name=CrossNodeLatency
1539.5348413569534
org.apache.cassandra.metrics:type=Messaging,name=dc1-Latency
1131.752