Github user tristeng commented on the pull request:

    https://github.com/apache/accumulo/pull/74#issuecomment-189065742
  
    Added in IT tests for the new functions, but ran into an interesting error 
and am hoping you all can provide me with some insight. I've added the 
following test into TestProxyNamespaceOperations:
    ```
      @Ignore("namespaceIdMap() is returning unexpected results; Python client 
works as expected. Investigating")
      @Test
      public void namespaceIds() throws TException {
        
assertTrue(tpc.proxy().namespaceIdMap(userpass).containsKey("accumulo"));
        assertEquals(tpc.proxy().namespaceIdMap(userpass).get("accumulo"), 
"+accumulo");
      }
    ```
    
    
    You can see I've ignored it...when I run through the debugger, 
`tpc.proxy().namespaceIdMap(userpass)` returns a map that seems to list the 
accumulo namespace tables (unexpected):
    ```
    "accumulo.replication" -> "accumulo.replication"
    "accumulo.metadata" -> "accumulo.metadata"
    "accumulo.root" -> "accumulo.root"
    ```
    
    When I run this same function through the Python test client and print the 
map, I get this Python map (which is what I expect for this function):
    `{'': '+default', 'testing': '1', 'accumulo': '+accumulo'}`
    
    As far as I can tell, I haven't messed up the function in the 
ProxyServer.java file:
    ```
      @Override
      public Map<String,String> namespaceIdMap(ByteBuffer login) throws 
org.apache.accumulo.proxy.thrift.AccumuloException,
          org.apache.accumulo.proxy.thrift.AccumuloSecurityException, 
TException {
        try {
          return getConnector(login).namespaceOperations().namespaceIdMap();
        } catch (Exception e) {
          handleException(e);
          return null;
        }
      }
    ```
    
    Any thoughts on where I should look?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to