You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by hyunsik <gi...@git.apache.org> on 2014/12/02 18:56:59 UTC

[GitHub] tajo pull request: TAJO-1222: DelimitedTextFile should be tolerant...

GitHub user hyunsik opened a pull request:

    https://github.com/apache/tajo/pull/277

    TAJO-1222: DelimitedTextFile should be tolerant against parsing errors.

    Please see the description and comments at https://issues.apache.org/jira/browse/TAJO-1222.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hyunsik/tajo TAJO-1222

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/277.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 #277
    
----
commit b260fcebd410e9942b515267ae8708214cf326d6
Author: Hyunsik Choi <hy...@apache.org>
Date:   2014-12-02T17:50:02Z

    TAJO-1222: DelimitedTextFile should be tolerant against parsing errors.

----


---
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.
---

[GitHub] tajo pull request: TAJO-1222: DelimitedTextFile should be tolerant...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/tajo/pull/277


---
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.
---

[GitHub] tajo pull request: TAJO-1222: DelimitedTextFile should be tolerant...

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the pull request:

    https://github.com/apache/tajo/pull/277#issuecomment-65362188
  
    +1 LGTM!
    Ship it!


---
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.
---

[GitHub] tajo pull request: TAJO-1222: DelimitedTextFile should be tolerant...

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/277#discussion_r21209793
  
    --- Diff: tajo-storage/src/main/java/org/apache/tajo/storage/text/DelimitedTextFile.java ---
    @@ -355,21 +368,58 @@ public float getProgress() {
     
         @Override
         public Tuple next() throws IOException {
    +
    +      if (!reader.isReadable()) {
    +        return null;
    +      }
    +
    +      if (targets.length == 0) {
    +        return EmptyTuple.get();
    +      }
    +
    +      VTuple tuple = new VTuple(schema.size());
    +
           try {
    -        if (!reader.isReadable()) return null;
     
    -        ByteBuf buf = readLine();
    -        if (buf == null) return null;
    +        // this loop will continue until one tuple is build or EOS (end of stream).
    +        do {
     
    -        if (targets.length == 0) {
    -          return EmptyTuple.get();
    -        }
    +          ByteBuf buf = readLine();
    +          if (buf == null) {
    +            return null;
    +          }
    +
    +          try {
    +
    +            deserializer.deserialize(buf, tuple);
    +
    --- End diff --
    
    Could you move the {{recordCount}} to this line?


---
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.
---