From 80bbbbea1a36b30ce4b95619544f22ad77d2e0d1 Mon Sep 17 00:00:00 2001 From: Ignacio Duart Date: Sun, 3 May 2020 10:20:28 +0200 Subject: [PATCH] Fix docker image build script --- docker/build_image.sh | 2 +- docker/id_rsa.pub | 2 +- src/io/local_file_reader.rs | 2 +- src/rdd/rdd.rs | 15 +++++---------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docker/build_image.sh b/docker/build_image.sh index afe4fd66..963e979c 100644 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -12,7 +12,7 @@ PACKAGE="vega:${VERSION}" cd $SCRIPT_PATH && cd .. echo "work dir: $(pwd)" -RUST_VERSION="$(cat ./rust-toolchain | tr -d '[:space:]')" +RUST_VERSION="nightly" echo "rust version: $RUST_VERSION" echo "building $PACKAGE..." diff --git a/docker/id_rsa.pub b/docker/id_rsa.pub index c73d4c1b..5ffd2c2c 100644 --- a/docker/id_rsa.pub +++ b/docker/id_rsa.pub @@ -1 +1 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCcjmvyQT2FsdM795b3dGv3GGDGIsz7v6YsogfjQmEbGdpaXNtqyYIpp/VGyc5/ia1e2n85MAUO2mjWxrAHU6+4owl8q6enARG+/xC9a6vuWdsBNhWV6V/pYVJnPAi/v4t8+uPnAY+6KaMuUKSOYNsfu0r88tzIW5nXTS/yG24BryyMzDuLbWzLGpR6PCjxhsMKqn41WoomJ+GEfH2acz/0Le82fGxUSuukkQJoSXGA5aMFaOgTmhXlVKyN2b/+pbxThB9YAB7mTsevQrit+J+Xvz0SOD332CV79DIysWwx19kKjcVYsIt5wNrknCehxV+I4IZ3+1LT4arWe+j0STJ vega_user@a0e0c0941a35 \ No newline at end of file +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCcjmvyQT2FsdM795b3dGv3GGDGIsz7v6YsogfjQmEbGdpaXNtqyYIpp/VGyc5/ia1e2n85MAUO2mjWxrAHU6+4owl8q6enARG+/xC9a6vuWdsBNhWV6V/pYVJnPAi/v4t8+uPnAY+6KaMuUKSOYNsfu0r88tzIW5nXTS/yG24BryyMzDuLbWzLGpR6PCjxhsMKqn41WoomJ+GEfH2acz/0Le82fGxUSuukkQJoSXGA5aMFaOgTmhXlVKyN2b/+pbxThB9YAB7mTsevQrit+J+Xvz0SOD332CV79DIysWwx19kKjcVYsIt5wNrknCehxV+I4IZ3+1LT4arWe+j0STJ ns_user@a0e0c0941a35 \ No newline at end of file diff --git a/src/io/local_file_reader.rs b/src/io/local_file_reader.rs index d3a32a23..94a5e249 100644 --- a/src/io/local_file_reader.rs +++ b/src/io/local_file_reader.rs @@ -49,7 +49,7 @@ impl LocalFsReaderConfig { /// Number of partitions to use per executor to perform the load tasks. /// One executor must be used per host with as many partitions as CPUs available (ideally). - pub fn num_partitiovega_per_executor(mut self, num: u64) -> Self { + pub fn num_partitions_per_executor(mut self, num: u64) -> Self { self.executor_partitions = Some(num); self } diff --git a/src/rdd/rdd.rs b/src/rdd/rdd.rs index 03841ec3..4035626f 100644 --- a/src/rdd/rdd.rs +++ b/src/rdd/rdd.rs @@ -1023,16 +1023,11 @@ pub trait Rdd: RddBase + 'static { Box::new(std::iter::once(queue)) }); - let queue = self - .map_partitions(first_k_func) - .reduce(Fn!( - move |queue1: BoundedPriorityQueue, - queue2: BoundedPriorityQueue| - -> BoundedPriorityQueue { - queue1.merge(queue2) - } - ))? - .unwrap() as BoundedPriorityQueue; + let queue = self.map_partitions(first_k_func).reduce(Fn!( + move |queue1: BoundedPriorityQueue, + queue2: BoundedPriorityQueue| + -> BoundedPriorityQueue { queue1.merge(queue2) } + ))?.ok_or_else(|| Error::Other)? as BoundedPriorityQueue; Ok(queue.into()) }