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 29D9C200D48 for ; Wed, 29 Nov 2017 18:49:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 287EA160C18; Wed, 29 Nov 2017 17:49:08 +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 43B19160C02 for ; Wed, 29 Nov 2017 18:49:07 +0100 (CET) Received: (qmail 15409 invoked by uid 500); 29 Nov 2017 17:49:06 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 15400 invoked by uid 99); 29 Nov 2017 17:49:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2017 17:49:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9FF0E18060F for ; Wed, 29 Nov 2017 17:49:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3ha8BsOuu8vo for ; Wed, 29 Nov 2017 17:49:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 809A45F58C for ; Wed, 29 Nov 2017 17:49:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 97563E25A2 for ; Wed, 29 Nov 2017 17:49:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E42D12105D for ; Wed, 29 Nov 2017 17:49:00 +0000 (UTC) Date: Wed, 29 Nov 2017 17:49:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-1897) Users should be able to configure eviction through gfsh MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 29 Nov 2017 17:49:08 -0000 [ https://issues.apache.org/jira/browse/GEODE-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271211#comment-16271211 ] ASF GitHub Bot commented on GEODE-1897: --------------------------------------- karensmolermiller commented on a change in pull request #1098: GEODE-1897 Docs: configure eviction through gfsh URL: https://github.com/apache/geode/pull/1098#discussion_r153864136 ########## File path: geode-docs/developing/eviction/configuring_data_eviction.html.md.erb ########## @@ -38,51 +38,26 @@ Configure data eviction as follows. You do not need to perform these steps in th 3. Decide the maximum amount of data to allow in the member for the eviction measurement indicated. This is the maximum for all storage for the region in the member. For partitioned regions, this is the total for all buckets stored in the member for the region - including any secondary buckets used for redundancy. 4. Decide whether to program a custom sizer for your region. If you are able to provide such a class, it might be faster than the standard sizing done by <%=vars.product_name%>. Your custom class must follow the guidelines for defining custom classes and, additionally, must implement `org.apache.geode.cache.util.ObjectSizer`. See [Requirements for Using Custom Classes in Data Caching](../../basic_config/data_entries_custom_classes/using_custom_classes.html). -**Note:** -You can also configure Regions using the gfsh command-line interface, however, you cannot configure `eviction-attributes` using gfsh. See [Region Commands](../../tools_modules/gfsh/quick_ref_commands_by_area.html#topic_EF03119A40EE492984F3B6248596E1DD) and [Disk Store Commands](../../tools_modules/gfsh/quick_ref_commands_by_area.html#topic_1ACC91B493EE446E89EC7DBFBBAE00EA). - -Examples: - -``` pre -// Create an LRU memory eviction controller with max bytes of 1000 MB -// Use a custom class for measuring the size of each object in the region - - - - com.myLib.MySizer - - Super Sizer - - - - -``` +**Examples:** -``` pre -// Create a memory eviction controller on a partitioned region with max bytes of 512 MB - - - - - - org.apache.geode.cache.util.ObjectSizer - - - - - -``` +Create an LRU memory eviction controller with a maximum limit of 1000 MB. Use a custom class for measuring the size of each object in the region: -``` pre -// Configure a partitioned region for heap LRU eviction. The resource manager controls the limits. - - ``` +gfsh>create region --type=REPLICATE --eviction-max-memory=1000 \ +--eviction-action=overflow-to-disk --eviction-object-sizer=com.myLib.MySizer +``` + +Create a memory eviction controller on a partitioned region with a maximum entry count of 512: -``` pre -Region currRegion = cache.createRegionFactory() - .setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes(EvictionAction.LOCAL_DESTROY)) - .create("root"); +``` +gfsh>create region --name=myRegion --type=PARTITION --eviction-entry-count=512 \ +--eviction-action=local-destroy ``` +To configure a partitioned region for heap LRU eviction, first configure the resource manager on server startup, then create a region with eviction enabled: +``` +gfsh>start server --name Server1 --eviction-heap-percentage=80 +... +gfsh>create region --type=PARTITION --eviction-enabled Review comment: The region name must be specified for the create region command. The start server's command needs an equals sign for specifying the server name. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Users should be able to configure eviction through gfsh > ------------------------------------------------------- > > Key: GEODE-1897 > URL: https://issues.apache.org/jira/browse/GEODE-1897 > Project: Geode > Issue Type: Sub-task > Components: docs, gfsh > Reporter: Swapnil Bawaskar > Assignee: Dave Barnes > Fix For: 1.4.0 > > > While creating a region in gfsh, users should be able to configure eviction for that region. > All three modes of eviction should be supported: > 1. Eviction driven by the resource manager: > {noformat} > gfsh>create region --name=myRegion --type=REPLICATE --eviction-enabled > {noformat} > 2. eviction driven by entry count in the region: > {noformat} > gfsh>create region --name=myRegion --type=REPLICATE --eviction-entry-count=1000 > {noformat} > 3. eviction driven by bytes used: > {noformat} > gfsh>create region --name=myRegion --type=REPLICATE --eviction-max-memory=100 > (value in megabytes) > {noformat} > And also specify the eviction action as > {noformat} > --eviction-action=overflow-to-disk or > --eviction-action=local-destroy > {noformat} > and an object sizer, so that users can plug-in custom object sizes as > {noformat} > --eviction-object-sizer=my.company.geode.MySizer > {noformat} > the sizer should only apply to heap and memory based eviction. -- This message was sent by Atlassian JIRA (v6.4.14#64029)