Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io 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 A0552160C26 for ; Tue, 2 Jan 2018 23:01:47 +0100 (CET) Received: (qmail 24027 invoked by uid 500); 2 Jan 2018 22:01:46 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 23263 invoked by uid 99); 2 Jan 2018 22:01:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2018 22:01:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 76B58E0014; Tue, 2 Jan 2018 22:01:45 +0000 (UTC) From: sohami To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #1077: DRILL-5068: Create sys.profiles and sys.profiles_j... Content-Type: text/plain Message-Id: <20180102220145.76B58E0014@git1-us-west.apache.org> Date: Tue, 2 Jan 2018 22:01:45 +0000 (UTC) archived-at: Tue, 02 Jan 2018 22:01:48 -0000 Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/1077#discussion_r159288870 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/ProfileIterator.java --- @@ -0,0 +1,216 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.store.sys; + +import com.google.common.base.Function; +import com.google.common.collect.Iterators; + +import org.apache.drill.exec.ExecConstants; +import org.apache.drill.exec.ops.FragmentContext; +import org.apache.drill.exec.ops.QueryContext; +import org.apache.drill.exec.proto.UserBitShared; +import org.apache.drill.exec.proto.UserBitShared.QueryProfile; +import org.apache.drill.exec.server.QueryProfileStoreContext; +import org.apache.drill.exec.server.options.QueryOptionManager; +import org.apache.drill.exec.util.ImpersonationUtil; + +import javax.annotation.Nullable; +import java.sql.Timestamp; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +/** + * DRILL-5068: Add a new system table for completed profiles + */ +public class ProfileIterator implements Iterator { + static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProfileIterator.class); + + private final QueryProfileStoreContext profileStoreContext; + private final Iterator itr; --- End diff -- Wildcard `` is unnecessary since `itr` looks to be assigned by type `` only ---