Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5554918365 for ; Tue, 16 Jun 2015 13:44:22 +0000 (UTC) Received: (qmail 32853 invoked by uid 500); 16 Jun 2015 13:44:22 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 32799 invoked by uid 500); 16 Jun 2015 13:44:22 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 32790 invoked by uid 99); 16 Jun 2015 13:44:22 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2015 13:44:22 +0000 Received: from mail-yh0-f51.google.com (mail-yh0-f51.google.com [209.85.213.51]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id CA3731A0B15 for ; Tue, 16 Jun 2015 13:44:21 +0000 (UTC) Received: by yhak3 with SMTP id k3so11394528yha.2 for ; Tue, 16 Jun 2015 06:44:21 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.123.196 with SMTP id w187mr562285ywc.100.1434462261175; Tue, 16 Jun 2015 06:44:21 -0700 (PDT) Received: by 10.129.24.211 with HTTP; Tue, 16 Jun 2015 06:44:21 -0700 (PDT) In-Reply-To: References: <557FB2FC.8090309@gmail.com> Date: Tue, 16 Jun 2015 09:44:21 -0400 Message-ID: Subject: Re: How to get the first key of the Tablet servers From: Christopher To: Accumulo User List Content-Type: text/plain; charset=UTF-8 The exception you're seeing are because you specified some authorizations in the scanner at scan time, which are not set on the user. The way the scan API works is that users are allowed to query with any subset of their authorizations. To grant auths to the user, use connector.tableOperations().changeUserAuthorizations(username, ...). Since you're using mini, you're probably going to use "root" for the username, unless you've created a separate user. Regardless of the target user, though, you'll have to use the root user's connector to perform this operation, since other users won't have permission to grant themselves authorizations. -- Christopher L Tubbs II http://gravatar.com/ctubbsii On Tue, Jun 16, 2015 at 2:33 AM, Rukshan Chathuranga wrote: > Hi, > > yes i mean the tablets. > > And i need the Key object for some implementation on Geowave. > > I tried as you said. But i get the Exception > "org.apache.accumulo.core.client.AccumuloSecurityException: Error > BAD_AUTHORIZATIONS for user root on table t1(ID:1) - The user does not have > the specified authorizations assigned" > > I am using miniAccumuloCluster. Do you know how to set the authorization? > > Thanks and Regards. > > > > Rukshan Chathuranga. > Department Of Computer Science & Engineering, > Faculty Of Engineering, > University Of Moratuwa. Sri Lanka. > WEB: http://www.rukspot.com/ > > > On Tue, Jun 16, 2015 at 10:54 AM, Josh Elser wrote: >> >> Not sure I understand your question. Do you mean of a Tablet instead of >> TabletServer? A TabletServer will host many Tablets. >> >> Assuming so, the easiest way to get the first key for each Tablet is to >> fetch the split points for a table. The split points are the end-row of each >> Tablet in a table. >> >> Then, to get the first keys in each Tablet, construct a `new >> Range($endRow)`, open a Scanner and fetch the first Key. Make sure you also >> do this with `new Range()` as well to get the first Key in the first Tablet >> for the table (the Tablet which starts at -inf). >> >> There is no easy way that I can think of to determine what the last key in >> a Tablet is. What is the reason that you want to explicitly know this? Maybe >> there is a different to do what you're trying to do? >> >> - Josh >> >> >> Rukshan Chathuranga wrote: >>> >>> hi, >>> >>> Does anyone know how to get the first or last key of the tablet servers? >>> >>> Thanks and Regards. >>> >>> /Rukshan Chathuranga./ >>> /Department Of Computer Science & Engineering, >>> / >>> /Faculty Of Engineering, >>> / >>> /University Of Moratuwa. //Sri Lanka./ >>> /WEB: http://www.rukspot.com/ >>> / >>> >