Return-Path: X-Original-To: apmail-spark-reviews-archive@minotaur.apache.org Delivered-To: apmail-spark-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BD941935E for ; Fri, 27 May 2016 07:01:27 +0000 (UTC) Received: (qmail 76649 invoked by uid 500); 27 May 2016 07:01:27 -0000 Delivered-To: apmail-spark-reviews-archive@spark.apache.org Received: (qmail 76625 invoked by uid 500); 27 May 2016 07:01:27 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 76614 invoked by uid 99); 27 May 2016 07:01:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2016 07:01:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A84B2E03C0; Fri, 27 May 2016 07:01:26 +0000 (UTC) From: tejasapatil To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org Message-ID: Subject: [GitHub] spark pull request: [SPARK-15601][CORE] CircularBuffer's toString(... Content-Type: text/plain Date: Fri, 27 May 2016 07:01:26 +0000 (UTC) GitHub user tejasapatil opened a pull request: https://github.com/apache/spark/pull/13351 [SPARK-15601][CORE] CircularBuffer's toString() to print only the contents written if buffer isn't full ## What changes were proposed in this pull request? [~sameerag] suggested this over a PR discussion: https://github.com/apache/spark/pull/12194#discussion_r64495331 If CircularBuffer isn't full, currently toString() will print some garbage chars along with the content written as is tries to print the entire array allocated for the buffer. The fix is to keep track of buffer getting full and don't print the tail of the buffer if it isn't full. ## How was this patch tested? Added new test case You can merge this pull request into a Git repository by running: $ git pull https://github.com/tejasapatil/spark circular_buffer Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/13351.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #13351 ---- commit 24e50bbecf88c5713564d6ed88cf5030da5f99ac Author: Tejas Patil Date: 2016-05-27T06:53:19Z [SPARK-15601][CORE] CircularBuffer's toString() to print only the contents written if buffer isn't full ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org