drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amithadke <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3963 Add Sequence file support.
Date Fri, 30 Oct 2015 00:46:39 GMT
Github user amithadke commented on a diff in the pull request:

    https://github.com/apache/drill/pull/214#discussion_r43462353
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestImpersonationQueries.java
---
    @@ -258,8 +286,35 @@ public void testMultiLevelImpersonationJoinOneSideExceedsMaxUserHops()
throws Ex
     
         assertNotNull("UserRemoteException is expected", ex);
         assertThat(ex.getMessage(),
    -        containsString("Cannot issue token for view expansion as issuing the token exceeds
the maximum allowed number " +
    -            "of user hops (3) in chained impersonation"));
    +      containsString("Cannot issue token for view expansion as issuing the token exceeds
the maximum allowed number " +
    +        "of user hops (3) in chained impersonation"));
    +  }
    +
    +  @Test
    +  public void sequenceFileChainedImpersonationWithView() throws Exception {
    +    // create a view named "simple_seq_view" on "simple.seq". View is owned by user0:group0
and has permissions 750
    +    createView(org1Users[0], org1Groups[0], "simple_seq_view",
    +      String.format("SELECT convert_from(t.binary_key, 'UTF8') as k FROM %s.`%s` t",
MINIDFS_STORAGE_PLUGIN_NAME,
    +        new Path(getUserHome(org1Users[0]), "simple.seq")));
    +    try {
    +      updateClient(org1Users[1]);
    +      test("SELECT k FROM %s.%s.%s", MINIDFS_STORAGE_PLUGIN_NAME, "tmp", "simple_seq_view");
    +    } catch (UserRemoteException e) {
    +      assertNull("This test should pass.", e);
    +    }
    +  }
    +
    +  @Test
    +  public void avroChainedImpersonationWithView() throws Exception {
    --- End diff --
    
    probably not since it was holding on to DrillFileSystem object during constructor (which
runs under proxy) and during setup creates avro reader using that object But lets stick to
this pattern for all hadoop recordreaders..


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

Mime
View raw message