Skip to content

can not implement "cargo install" #9

@nelzhang02184516

Description

@nelzhang02184516

warning: Using cargo install to install the binaries for the package in current working directory is deprecated, use cargo install --path . instead. Use cargo build if you want to simply build the package.
Installing kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark)
Updating crates.io index
Updating git repository https://github.com/fede1024/rust-rdkafka.git
Compiling kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark)
error[E0432]: unresolved import rdkafka::util::duration_to_millis
--> src/units.rs:1:5
|
1 | use rdkafka::util::duration_to_millis;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no duration_to_millis in util

error[E0277]: the trait bound rdkafka::consumer::StreamConsumer: rdkafka::consumer::Consumer is not satisfied
--> src/consumer/mod.rs:105:36
|
51 | fn initialize_consumer<T: FromClientConfig + Consumer>(scenario: &ConsumerScenario) -> T {
| ------------------- -------- required by this bound in consumer::initialize_consumer
...
105 | let consumer: StreamConsumer = initialize_consumer(scenario);
| ^^^^^^^^^^^^^^^^^^^ the trait rdkafka::consumer::Consumer is not implemented for rdkafka::consumer::StreamConsumer
|
= help: the following implementations were found:
<rdkafka::consumer::StreamConsumer as rdkafka::consumer::Consumer<rdkafka::consumer::stream_consumer::StreamConsumerContext>>

error[E0599]: no method named wait found for struct rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext> in the current scope
--> src/consumer/mod.rs:120:37
|
120 | for message in consumer.start().wait() {
| ^^^^ method not found in rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>
|
::: /root/.cargo/git/checkouts/rust-rdkafka-34d944143d921bb0/2901a4b/src/consumer/stream_consumer.rs:94:1
|
94 | / pub struct MessageStream<
95 | | 'a,
96 | | C,
97 | | // Ugly, but this provides backwards compatibility when the tokio feature
... |
108 | | no_message_error: bool,
109 | | }
| |_- doesn't satisfy _: futures::Stream
|
= note: the method wait exists but the following trait bounds were not satisfied:
rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>: futures::Stream
which is required by &mut rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>: futures::Stream

error[E0599]: no method named send_copy found for struct rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext> in the current scope
--> src/producer/mod.rs:55:10
|
55 | .send_copy::<str, str>(&scenario.topic, None, Some("warmup"), None, (), None)
| ^^^^^^^^^ method not found in rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext>

error[E0599]: no method named send_copy found for struct rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext> in the current scope
--> src/producer/mod.rs:68:28
|
68 | match producer.send_copy::<[u8], [u8]>(
| ^^^^^^^^^ method not found in rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext>

error[E0599]: no method named wait found for struct rdkafka::producer::DeliveryFuture in the current scope
--> src/producer/mod.rs:96:22
|
96 | match future.wait() {
| ^^^^ method not found in rdkafka::producer::DeliveryFuture
|
::: /root/.cargo/git/checkouts/rust-rdkafka-34d944143d921bb0/2901a4b/src/producer/future_producer.rs:219:1
|
219 | pub struct DeliveryFuture {
| ------------------------- doesn't satisfy rdkafka::producer::DeliveryFuture: futures::Future
|
= note: the method wait exists but the following trait bounds were not satisfied:
rdkafka::producer::DeliveryFuture: futures::Future
which is required by &mut rdkafka::producer::DeliveryFuture: futures::Future

error[E0599]: no method named send_copy found for struct rdkafka::producer::FutureProducer in the current scope
--> src/producer/mod.rs:119:10
|
119 | .send_copy::<str, str>(&scenario.topic, None, Some("warmup"), None, None, 1000)
| ^^^^^^^^^ method not found in rdkafka::producer::FutureProducer

error[E0599]: no method named send_copy found for struct rdkafka::producer::FutureProducer in the current scope
--> src/producer/mod.rs:131:31
|
131 | futures.push(producer.send_copy::<[u8], [u8]>(
| ^^^^^^^^^ method not found in rdkafka::producer::FutureProducer

warning: unused import: futures::Stream
--> src/consumer/mod.rs:4:5
|
4 | use futures::Stream;
| ^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

warning: unused import: Future
--> src/producer/mod.rs:1:21
|
1 | use futures::{self, Future};
| ^^^^^^

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0277, E0432, E0599.
For more information about an error, try rustc --explain E0277.
error: failed to compile kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark), intermediate artifacts can be found at /home/zyh/kafka-benchmark/target

Caused by:
could not compile kafka-benchmark.

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions