Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EDD9B200AF8 for ; Thu, 5 May 2016 20:11:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EC6A4160A03; Thu, 5 May 2016 18:11:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 404B11609F3 for ; Thu, 5 May 2016 20:11:57 +0200 (CEST) Received: (qmail 67463 invoked by uid 500); 5 May 2016 18:11:56 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 67450 invoked by uid 99); 5 May 2016 18:11:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2016 18:11:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 756881A02BA for ; Thu, 5 May 2016 18:11:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id fl_tvFj-2gc6 for ; Thu, 5 May 2016 18:11:54 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id AE6845F1C6 for ; Thu, 5 May 2016 18:11:53 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id x201so112084271oif.3 for ; Thu, 05 May 2016 11:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=vax4Qbc6xIljNs+QdUzScjf0Bxw+x/w/XmbP2Fg36MU=; b=OXVhGO4Xnoqn8oxOeW7KwqTvixanbxAaY19sa0fS+ShlREoEVNI+zejJiUVzUvRfTl Zoye3EhNaAwhXY28P1acJKttYVRZK1CM8YRa0+mr4xQxy5w2th+Yl75SB2uTvUuvEagS w5D6ZvyqCby763V0oVwxIOUxjeuLVB1D9nR6JxDEnFDOwRdO7iphn0WEsDCbkVj7Jan1 s2CtTJ7PNUaDZyOS++rjRAqhXiUYi5g0atgomE4yRRzX4Kr7+in9aj8qRQH/QREwTfre IUY3OBS67mDKo+wV6xYhRymudKmihweX48saRnYj5t9lgydjkdK1YiY+HVvVxtLDPlvX Z1cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=vax4Qbc6xIljNs+QdUzScjf0Bxw+x/w/XmbP2Fg36MU=; b=Aj6fovP+Hu66wwKh13X40dYBKQOniavsKPoxHYUJGdgKez07gTAoEzGpKf5metXJI5 m17/oR7h4K8E6kxI4+dPpRRoltC+Uyc5XQuhD9IePSgne/cq3hF20oajk5XDIgGTdvu9 /GPf6H/MOrHo38Xq7U+WWT5Tavv+r11glwyRYZO51Axebu0Vxfs7MQ6564JUXAuks8+n EF6Ck+9hpjpZtljo4bcujLAKUvPeCrmUECXWgSxztr+PdAXX3afBCzMRyudYwOdUnB3A lSPcyBqsviK2nbTKZA6lYAmQBYELy9luWtKynmXJnqyHru3aVxv80q2DhVbP+2QR5BBe kb8A== X-Gm-Message-State: AOPr4FW9OGI4IxT0pFHbfDjsKZE3h3KPJWCBMeD74J+FNQcmcArJKg6DcnCqUl9ELMyZAySp1sdDBNzI8oJouA== MIME-Version: 1.0 X-Received: by 10.157.36.110 with SMTP id p101mr7540303ota.29.1462471912537; Thu, 05 May 2016 11:11:52 -0700 (PDT) Received: by 10.157.3.51 with HTTP; Thu, 5 May 2016 11:11:52 -0700 (PDT) Date: Thu, 5 May 2016 14:11:52 -0400 Message-ID: Subject: Get the methodName and parameters from the Call object in server.java From: Kun Ren To: hdfs-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a113b0c34d745df05321c4674 archived-at: Thu, 05 May 2016 18:11:58 -0000 --001a113b0c34d745df05321c4674 Content-Type: text/plain; charset=UTF-8 Hi Genius, I want to intercept the requests in the processRpcRequest() method in the listener component in server.java, for example if I want to intercept the "mkdirs" and "append" request, I just try to get the method name and parameters before this line: callQueue.put(call); Currently I use the following way to get the method name: rpcRequest = call.rpcRequest; RpcRequestWrapper request = (RpcRequestWrapper) rpcRequest; RequestHeaderProto rpcRequestProto = request.getRequestHeader(); String methodName = rpcRequestProto.getMethodName(); Then the methodName is "mkdirs" if the request is "./bin/hdfs dfs -mkdir input/test1", however I don't know how to get the parameter, like "input/test1", does anyone know how to get the methodName and parameters from the Call object? Thanks a lot and very appreciate. --001a113b0c34d745df05321c4674--