Merge pull request #542 from ming535/ming

chore: some minor comments and rename
pull/24376/head
Dom 2020-12-10 10:18:18 +00:00 committed by GitHub
commit 756e7de867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -174,7 +174,7 @@ pub fn lines_to_replicated_write(
}
pub fn split_lines_into_write_entry_partitions(
partition_key: impl Fn(&ParsedLine<'_>) -> String,
partition_key_fn: impl Fn(&ParsedLine<'_>) -> String,
lines: &[ParsedLine<'_>],
) -> Vec<u8> {
let mut fbb = flatbuffers::FlatBufferBuilder::new_with_capacity(1024);
@ -183,7 +183,7 @@ pub fn split_lines_into_write_entry_partitions(
let mut partition_writes = BTreeMap::new();
for line in lines {
let key = partition_key(line);
let key = partition_key_fn(line);
partition_writes
.entry(key)

View File

@ -10,7 +10,7 @@
//! # object_store
//!
//! This crate provides APIs for interacting with object storage services. It currently supports
//! PUT, GET, DELETE, and list for Google Cloud Storage, Amazon S3, and in-memory storage.
//! PUT, GET, DELETE, and list for Google Cloud Storage, Amazon S3, in-memory and local file storage.
//!
//! Future compatibility will include Azure Blob Storage, Minio, and Ceph.

View File

@ -143,13 +143,12 @@ pub async fn main() -> Result<()> {
let app_server = app_server.clone();
async move {
Ok::<_, http::Error>(service_fn(move |req| {
let state = app_server.clone();
http_routes::service(req, state)
http_routes::service(req, app_server.clone())
}))
}
});
let server = Server::try_bind(&bind_addr)
let http_server = Server::try_bind(&bind_addr)
.context(StartListening { bind_addr })?
.serve(make_svc);
info!("Listening on http://{}", bind_addr);
@ -157,7 +156,7 @@ pub async fn main() -> Result<()> {
println!("InfluxDB IOx server ready");
// Wait for both the servers to complete
let (grpc_server, server) = futures::future::join(grpc_server, server).await;
let (grpc_server, server) = futures::future::join(grpc_server, http_server).await;
grpc_server.context(ServingRPC)?;
server.context(ServingHttp)?;