diff --git a/configure.py b/configure.py index 2f0b211577..0f6675abaa 100755 --- a/configure.py +++ b/configure.py @@ -466,6 +466,7 @@ urchin_core = (['database.cc', 'streaming/streaming.cc', 'streaming/stream_session.cc', 'streaming/stream_request.cc', + 'streaming/stream_summary.cc', ] + [Antlr3Grammar('cql3/Cql.g')] + [Thrift('interface/cassandra.thrift', 'Cassandra')] diff --git a/streaming/stream_summary.cc b/streaming/stream_summary.cc new file mode 100644 index 0000000000..513b65cf36 --- /dev/null +++ b/streaming/stream_summary.cc @@ -0,0 +1,22 @@ +/* + * 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. + * + * Modified by Cloudius Systems. + * Copyright 2015 Cloudius Systems. + */ + +#include "streaming/stream_summary.hh" diff --git a/streaming/StreamSummary.java b/streaming/stream_summary.hh similarity index 77% rename from streaming/StreamSummary.java rename to streaming/stream_summary.hh index dc332cbb8a..672d0a88f6 100644 --- a/streaming/StreamSummary.java +++ b/streaming/stream_summary.hh @@ -14,44 +14,38 @@ * 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. + * + * Modified by Cloudius Systems. + * Copyright 2015 Cloudius Systems. */ -package org.apache.cassandra.streaming; -import java.io.DataInput; -import java.io.IOException; -import java.io.Serializable; -import java.util.UUID; +#pragma once -import com.google.common.base.Objects; +#include "utils/UUID.hh" -import org.apache.cassandra.db.TypeSizes; -import org.apache.cassandra.io.IVersionedSerializer; -import org.apache.cassandra.io.util.DataOutputPlus; -import org.apache.cassandra.net.MessagingService; -import org.apache.cassandra.utils.UUIDSerializer; +namespace streaming { /** * Summary of streaming. */ -public class StreamSummary implements Serializable -{ - public static final IVersionedSerializer serializer = new StreamSummarySerializer(); - - public final UUID cfId; +class stream_summary { +public: + using UUID = utils::UUID; + UUID cf_id; /** * Number of files to transfer. Can be 0 if nothing to transfer for some streaming request. */ - public final int files; - public final long totalSize; + int files; + long total_size; - public StreamSummary(UUID cfId, int files, long totalSize) - { - this.cfId = cfId; - this.files = files; - this.totalSize = totalSize; + stream_summary(UUID _cf_id, int _files, long _total_size) + : cf_id (_cf_id) + , files(_files) + , total_size(_total_size) { } +#if 0 @Override public boolean equals(Object o) { @@ -104,4 +98,7 @@ public class StreamSummary implements Serializable return size; } } -} +#endif +}; + +} // namespace streaming