Unit calculation

hi gurus,
what is unit calculation?
unit calculation is using in 3.x versions....
please give me step by step

Hello Kishore,
Example : When you maintain two different Units for the same material, lets say your UOM is Grams and the Unit is in KG , then you need to convert the grams into KG.
500G = .5KG is a simple example
This applies when you have diffrent countries as they may maintain in different units like Tonnes.
See the below links for more info
[Unit Conversion|http://help.sap.com/saphelp_nw04/helpdata/en/0c/3f17143b7a11d4b2c70050dadfb23f/content.htm]
[How to Report Data in Alternate Units of Measure|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b7b2aa90-0201-0010-a480-a755eeb82b6f]
[Define unit of measure conversions in 0MATERIAL definition - Business Intelligence - Wiki|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/define%2bunit%2bof%2bmeasure%2bconversions%2bin%2b0material%2bdefinition]
Thanks
Chandran

Similar Messages

  • Unit calculation in routine

    Hi,
    How can I force unit KG for my key figures?
    Situation is as follows:
    I have an InfoCube which combines information for SEM. All sales are planned as kilograms (KG). The information from APO is also presented in kilograms, but that information uses 0BASE_UOM whereas the sales planning is done by entering amount of sales (0G_QVVMRA).
    So now I have 0G_QVVMRA as target unit and 0BASE_UOM as source. These two don't mix and field for 0G_QVVMRA is left empty in the cube when data from APO is loaded.
    Is have tried the following routine for unit calculation, but without success:
    TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS8APO_DP_RA
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/VZMYY003T-/BIC/ZSEMBUDK1
               UNIT LIKE /BIC/VZMYY003T-G_UVVMRA
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      RESULT = COMM_STRUCTURE-/bic/zdkamptot.
    result value of the unit
      UNIT = 'KG'.
    if the returncode is not equal zero, the result will not be updated
      RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    The situation is what it is, I can't change the data or objects coming from APO neither can I touch the objects in sales so the unit transformation has to be done here. Please advice!
    rgrds,
    Miikka

    Dear Mikka,
    Are you getting any error ?? If Yes can you eloborate on it .
    Thanks,
    krish

  • How to write custom unit calculator

    We are using Coherence 3.4.2 for Java. I am trying to write our own unit calculator. As I played with the example coming with Coherence, I modify the explore-config.xml as following:
    <cache-config>
    <caching-scheme-mapping>
    <!--
    Caches with any name will be created as default replicated.
    -->
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>default-distributed</scheme-name>
    </cache-mapping>
    <cache-mapping>
    <cache-name>VirtualCache</cache-name>
    <scheme-name>default-distributed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <!--
    Default Replicated caching scheme.
    -->
    <replicated-scheme>
    <scheme-name>default-replicated</scheme-name>
    <service-name>ReplicatedCache</service-name>
    <backing-map-scheme>
    <class-scheme>
    <scheme-ref>default-backing-map</scheme-ref>
    </class-scheme>
    </backing-map-scheme>
    </replicated-scheme>
    <!--
    Default Distributed caching scheme.
    -->
    <distributed-scheme>
    <scheme-name>default-distributed</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <local-scheme>
    <high-units>272</high-units>
    <low-units>50</low-units>
    *<unit-calculator><class-scheme><class-name>com.tangosol.examples.explore.TestMemoryCalculator</class-name></class-scheme></unit-calculator>*
    </local-scheme>
    </backing-map-scheme>
    </distributed-scheme>
    <!--
    Default backing map scheme definition used by all
    The caches that do not require any eviction policies
    -->
    <class-scheme>
    <scheme-name>default-backing-map</scheme-name>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    </class-scheme>
    </caching-schemes>
    </cache-config>
    I write the very simple java code:
    package com.tangosol.examples.explore;
    import com.tangosol.net.cache.OldCache;
    class TestMemoryCalculator implements OldCache.UnitCalculator {
    public TestMemoryCalculator() {
    public int calculateUnits(Object oKey, Object oValue) {
    int size = 0;
    System.out.println("size = " + size);
    return size;
    When I try to run the example program, I got the following error:
    yzhang@bsdhcp174172:~/work/coherence> java -cp ./lib/coherence.jar:./lib/tangosol.jar:./examples/java -Dtangosol.coherence.cacheconfig=./examples/config/explore-config-dist.xml com.tangosol.examples.explore.SimpleCacheExplorer
    2009-05-27 14:57:55.019/0.294 Oracle Coherence 3.4.2/411 <Info> (thread=main, member=n/a): Loaded operational configuration from resource "jar:file:/home/yzhang/work/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2009-05-27 14:57:55.025/0.300 Oracle Coherence 3.4.2/411 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/home/yzhang/work/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-05-27 14:57:55.025/0.300 Oracle Coherence 3.4.2/411 <D5> (thread=main, member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
    2009-05-27 14:57:55.031/0.306 Oracle Coherence 3.4.2/411 <D5> (thread=main, member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.4.2/411
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    2009-05-27 14:57:55.260/0.535 Oracle Coherence GE 3.4.2/411 <Info> (thread=main, member=n/a): Loaded cache configuration from file "/home/yzhang/work/coherence/examples/config/explore-config-dist.xml"
    2009-05-27 14:57:55.555/0.830 Oracle Coherence GE 3.4.2/411 <Warning> (thread=main, member=n/a): UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 178 packets (262144 bytes). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.
    2009-05-27 14:57:55.695/0.970 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2009-05-27 14:57:58.897/4.172 Oracle Coherence GE 3.4.2/411 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0x2FFB" with Member(Id=1, Timestamp=2009-05-27 14:57:55.564, Address=172.19.174.172:8088, MachineId=4524, Location=site:americas.nokia.com,machine:bsdhcp174172,process:16242, Role=TangosolSimpleCacheExplorer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) UID=0xAC13AEAC00000121836F916C11AC1F98
    2009-05-27 14:57:59.062/4.337 Oracle Coherence GE 3.4.2/411 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
    2009-05-27 14:57:59.118/4.393 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: Yong
    2009-05-27 14:57:59.118/4.393 Oracle Coherence GE 3.4.2/411 <Error> (thread=DistributedCache, member=1):
    java.lang.IllegalArgumentException: Unknown unit calculator:
    <class-scheme>
    <class-name>com.tangosol.examples.explore.TestMemoryCalculator</class-name>
    </class-scheme>
    at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateLocalCache(DefaultConfigurableCacheFactory.java:1641)
    at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1063)
    at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1059)
    at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:3124)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.instantiateResourceMap(DistributedCache.CDB:19)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.setCacheName(DistributedCache.CDB:27)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConfigListener.entryInserted(DistributedCache.CDB:15)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:164)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
    at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
    at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
    at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
    at com.tangosol.coherence.component.util.collections.WrapperMap.put(WrapperMap.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.put(Grid.CDB:13)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$StorageIdRequest.onReceived(DistributedCache.CDB:40)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:130)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
    at java.lang.Thread.run(Thread.java:619)
    Of course, if I replaced my TestMemoryCalculator with the SimpleMemoryCalculator coming with coherence, it works. My question is that why my custom unit calculator in this example DOES NOT work? And what part I did it wrong?
    Thanks

    Hi java8964,
    It probably didn't compile because you didn't implement getName() method:
    package com.tangosol.examples.explore;
    import com.tangosol.net.cache.OldCache;
    class TestMemoryCalculator implements OldCache.UnitCalculator
        public TestMemoryCalculator()
        public int calculateUnits(Object oKey, Object oValue)
            int size = 0;
            System.out.println("size = " + size);
            return size;
        public String getName()
            return "TestMemoryCalculator";
        } Regards,
    Dimitri

  • Unit calculation at routine in update rule

    Hello,
    Can anybody explain me how to calculate unit in update rule routine.
    In update rule routine how to access infocube keyfigure like we access communication structure as comm_structure.
    Is there any sample code?
    Please help me out.
    Thanks,
    Regards,
    Steve

    Hi,
    You can find out the no of routines with standard Update rules.
    one of them is :
    <i>for 'Net weight in kilograms' 2LIS_13_VDITM-->0SD_C03</i>
    IF COMM_STRUCTURE-UNIT_OF_WT NE 'KG'.
        WEIGHT = COMM_STRUCTURE-GRS_WGT_DL.
        CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
             EXPORTING
                  INPUT                = COMM_STRUCTURE-GRS_WGT_DL
                  UNIT_IN              = COMM_STRUCTURE-UNIT_OF_WT
                  UNIT_OUT             = 'KG'
             IMPORTING
                  OUTPUT               = WEIGHT
             EXCEPTIONS
                  CONVERSION_NOT_FOUND = 1
                  DIVISION_BY_ZERO     = 2
                  INPUT_INVALID        = 3
                  OUTPUT_INVALID       = 4
                  OVERFLOW             = 5
                  TYPE_INVALID         = 6
                  UNITS_MISSING        = 7
                  UNIT_IN_NOT_FOUND    = 8
                  UNIT_OUT_NOT_FOUND   = 9
                  OTHERS               = 10.
        IF SY-SUBRC NE 0.
          CLEAR MONITOR.
          MONITOR-msgno = '009'.
          MONITOR-msgid = 'SDBW'.
          MONITOR-msgty = c_msgty_e.
          MONITOR-msgv1 = COMM_STRUCTURE-UNIT_OF_WT.
          append MONITOR.
          RETURNCODE = 4.
          WEIGHT = 0.
        ELSE.
          RESULT = WEIGHT.
          RETURNCODE = 0.
        ENDIF.
      ELSE.
        RESULT = COMM_STRUCTURE-GRS_WGT_DL.
        RETURNCODE = 0.
      ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • Currency/unit calculation realtime

    Hi All,
    I have a planning cube and a bex query to control input. Users wants to plan in different currencies (USD, EUR) and also in different units (SHT, TNE). Both of these things are entered on the popup (variables).
    When user(A) selects USD he enters and stores in USD. The thing is when another user(B) is selecting the same planning data but wants to use EUR for planning he will not see the already entered amount by user(A).
    Ideally I want to convert from EUR to the selected quantity when data are read. When storing I want to convert back. I tried to utilize the conversion functionality of QD(by selecting currency EUR and changing the conversion to utilize the variable in which users enter their target currency without success ;-(
    Any one who has tried something similar? perhaps using virtual keyfigures or with userexits (I dont know if there is a user exit in BI-IP when saving data and when retrieving data)
    Help appreciated regarding the ideal scenario mentioned above.
    /MiB

    Planning in two currencies for the same data is not straightforward. What we once did for a similar scenario was to create separate keyfigures - each having its own currency; and separate planning layout with for each currency (keyfigure). When the user pressed save, we use to convert the amounts to differenct currencies (using CURC statement in Fox) and store them in respective KFs. See if this can help you.

  • Before reaching the high unit,   'End of file reached' error pops up.

    Following is the <distributed-scheme> of my cache server.
    <distributed-scheme>
    <scheme-name>dom-dist</scheme-name>
    <service-name>DOM-CACHE</service-name>
    <backup-count>1</backup-count>
    <backing-map-scheme>
    <overflow-scheme>
    <scheme-name>dom-overflow</scheme-name>
    <front-scheme>
    <local-scheme>
    <scheme-ref>LocalSizeLimited-dom</scheme-ref>
    </local-scheme>
    </front-scheme>
    <back-scheme>
    <external-scheme>
    <eviction-policy>LFU</eviction-policy>
    <unit-calculator>BINARY</unit-calculator>
    *<high-units>8192</high-units>*
    <unit-factor>1048576</unit-factor>
    <lh-file-manager>
    <directory>/home/coherence/cachedata</directory>
    <file-name>{cache-name}.store</file-name>
    </lh-file-manager>
    </external-scheme>
    </back-scheme>
    </overflow-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <local-scheme>
    <scheme-name>LocalSizeLimited-dom</scheme-name>
    <eviction-policy>LRU</eviction-policy>
    <high-units>350</high-units>
    <unit-calculator>BINARY</unit-calculator>
    <unit-factor>1048576</unit-factor>
    </local-scheme>
    </distributed-scheme>
    +I could see the file {cache-name}.store is saved but before reaching the high unit (8192) following error pops up and then the node shutsdown.+
    Error:
    2009-07-28 08:41:42.253/52233.963 Oracle Coherence GE 3.6.1.0 <Error> (thread=DistributedCache:DOM-CACHE, member=2):
    (Wrapped) com.tangosol.io.lh.LHIOException: /home/coherence/cachedata/BIZ-DOM.store, Primary file, Reading, Group 886, Frame 886: End of file reached.
    at com.tangosol.io.lh.LHBinaryStore.load(LHBinaryStore.java:109)2009-07-28 08:41:42.254/52267.134 Oracle Coherence GE 3.6.1.0 <D5> (thread=Cluster, member=1): Member 2 joined Service DOM-CACHE with senior member 3
    2009-07-28 08:41:50.228/52275.108 Oracle Coherence GE 3.6.1.0 <Error> (thread=DistributedCache:DOM-CACHE, member=1):
    (Wrapped) com.tangosol.io.lh.LHIOException: /home/coherence/cachedata/BIZ-DOM.store, Primary file, Reading, Group 886, Frame 886: End of file reached.
    at com.tangosol.io.lh.LHBinaryStore.load(LHBinaryStore.java:109)
    Edited by: online247 on Jul 19, 2011 3:07 PM

    Hi Online247,
    Despite LH has been deprecated and overflow-scheme is not used by many people, using disk based overflow as shown at the URL below could be useful for what you are trying to achieve:
    http://hi.baidu.com/chenjf79/blog/item/42be1a2adf6d059c033bf691.html
    Hope it helps.
    -Cris

  • Create unit cost reports in Hyperion Financial Reporting

    Hi,
    I have some doubts regarding the creation of "per unit" reports in Hyperion Financial Reporting. In the business model we have:
    - different cost and revenue groups (identified by accounts dimension)
    - different business channels (identified by business channel dimension)
    - units different for each business channel (identified by accounts dimension and by currency dimension)
    What would be the most efficient way to easily construct per unit reporting? Reporting should be able to show data as:
    (*in principle, the "$ per unit" column is the most important one. The other columns could be hidden without problem)
    (**the main challenge is to be able to easily reflect per unit values calculated with different units, depending on the business channel and potentially other dimensions)
    More precisely, the questions are:
    1. What should be the dimensions structure? Units in separate dimension? Or inside accounts dimension and differentiate with currency dimension?
    2. The calculation of per unit amounts should be done within the reporting or should it be precalculated value?
    2a. If within reporting - how to technically include this calculations? Show $ and units and then use the formula?
    2b. If precalculated - how to solve the problem that the TOTAL per unit values are not the sum of per unit values for each Business channel separately (as each Business channel has its per unit calculated only with the units of this Business channel)? (please take into account that Business channel may not be the only dimension that changes the units to be used in per unit calculation - we can also have different units for different cost centers etc.)
    3. How to show $ and units separately, as in the example, if, when limiting a row by Revenue, for example, is making the units value for this row 0? How to overcome this?
    Many thanks in advance for your help and best regards,
    Pawel

    I came up with one concept of how to deal with this problem - let me know what you think. The idea is pictured in the image below:
    The answers to the 3 questions using this solution would be:
    1. What should be the dimensions structure? Units in separate dimension? Or inside accounts dimension and differentiate with currency dimension?
    Units would be a separate account in the "accounts" dimension. But also, units could be differentiated by the "currency" dimension.
    2. The calculation of per unit amounts should be done within the reporting or should it be precalculated value?
    2a. If within reporting - how to technically include this calculations? Show $ and units and then use the formula?
    Withing the reporting, as I have no solution to precalculate per unit values using so many different groups of units - if we want to have different per unit per each business channel or cost center etc. I understand we would need that many different precalculated "per unit" values, which would be a lot...
    Regarding 2a, a simple formula would do (box C). However, for rows with auto totals, the formula would need to have priority over the autototals (box D) - how is that done? Is it possible and easy?
    3. How to show $ and units separately, as in the example, if, when limiting a row by Revenue, for example, is making the units value for this row 0? How to overcome this?
    As we can differenciate units using both accounts and currency dimension, with the accounts placed in rows, the elements selected would always include the units (box A). Then, in the columns, using "currency" you would choose whether to show the cost and revenue accounts ($) or units (box B). Like this you would not get 0 in units, neither you would distort $ amounts.
    What is your opinion? Best regards!

  • Update rules, different source and target units (0BASE_UOM-- 0QVVMRA)

    Hi,
    I have a problem with update rules as I'm trying to map two keyfigures with different unit-types together. They are both kilograms (KG) but the source figure is defined as 0BASE_UOM and the target keyfigure is 0QVVMRA (Amount of sales).
    How can I make this connection work? Do I have to use the 'Unit calculation in routine' -option or is there a more simple way? I a routine must ne written, please post an example or link to a thread which has one.
    Thx!
    -miikka

    Hi,
    The Problem is that you are trying to connect a Key Fig for Type Quantity with the Key Figure Amount.
    The Amount Key Fig will have either 0CURRENCY or Fixed Currency.
    Using Update Rules Coding you could transfer the Value but you will have problems with the Currency. You cant store a Unit like KG in 0CURRENCY.
    Regards.

  • SSAS - Creating a Measure For Defects Per Unit

    Hello, everyone
    I'm attempting to create a Defect Per Unit calculation. I have an odd situation where my source data is recording all of instances of a given Defect (the single defect is recorded in multiple locations, DimLocation). So I'm receiving many rows that I need
    to represent as a single defect.
    How can I create a measure that will properly count each defect (DimDefect) only once-per-unit? Can I do this without creating a separate fact table and measure group that removes DimLocation? (The location is needed for some other measures but this one
    won't use it. My goal is to simplify the cube structure for the user.)
    I'm pretty new to MDX so if there is any other information I can provide, I would appreciate it.
    Thank you!,
    -Aaron B.

    You can also do the same by using the concept of Semi-Additive Measures or the other turn around you can think of is (SUM of DefectMeasure) / (Count of Defects) ... The only problem with the second approach is you will get a Total of the same which sums
    everything and deletes that with the count.. My possible suggestion would be go with Semi - Additive Measure (Last Non Empty / First Non Empty such)... I didn't do this same this MDX way, but I am sure that would be possible too.
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Limit to high-units for 64bit JVM?

    Hi all,
    I'm doing some testing on 3.4.1 with a 64bit JVM and a large storage node. I have the JVM starting up fine with a min/max memory footprint of 17GB. I have one distributed cache defined as such:
    <distributed-scheme>
    <scheme-name>UDMessagesDistributedScheme</scheme-name>
    <service-name>UDMessagesDistributedScheme</service-name>
    <autostart>true</autostart>
    <backing-map-scheme>
    <local-scheme>
    <scheme-name>UDMessagesDistributedInMemoryScheme</scheme-name>
    <!-- 17GB JVM - 800MB applciation -->
    <high-units>17414750208</high-units>
    <eviction-policy>HYBRID</eviction-policy>
    <unit-calculator>BINARY</unit-calculator>
    </local-scheme>
    </backing-map-scheme>
    <backup-count>0</backup-count>
    </distributed-scheme>
    Nothing complains, but when I browse the JMX GUI, the <high-units> reported is reduced to 234881024, and pruning happens as if this byte size (about 225MB) is being used.
    What I'm guessing is that <high-units> is represented as an Integer that has a max value of 2^31 - 1 that is smaller than my requested size. But if I'm using a 64bit JVM, the max should be 2^63 - 1, which is plenty big for my value.
    Does anyone have any experience with storage nodes of this size, or suggestions how to utilize this space?
    Thanks!

    Hi
    Yes this is something that will be fixed in the next release of Coherence. In version 3.5 we introduced unit factor to handle large values for the binary calculator. So the high-units can be paired with a unit-factor element.
    If you want to look more at the documentation http://coherence.oracle.com/display/COH35UG/local-scheme.
    The current plan is that the high-units will be a long (64 bit) in the next major release of Coherence (4.0).
    Thanks
    /Charlie

  • High-units watermark reached but cache does not shrink back to low-units mark

    Here is our config:
        <caching-scheme-mapping>
            <cache-mapping>
                <cache-name>Cache2</cache-name>
                <scheme-name>Scheme2</scheme-name>
            </cache-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
            <distributed-scheme>
                <scheme-name>Scheme2</scheme-name>
                <service-name>Service2</service-name>
                <backing-map-scheme>
                    <local-scheme>
                        <eviction-policy>LRU</eviction-policy>
                        <high-units>700m</high-units>
                        <unit-calculator>BINARY</unit-calculator> 
                        <expiry-delay>2h</expiry-delay>
                    </local-scheme>
                </backing-map-scheme>
                <autostart>true</autostart>
            </distributed-scheme>
    We're running on two storage 4 GB JVMs.
    We run a load test that will eventually make caches reach 700 MB (734003200 kb) on each JVM/node.
    When the high-unit is reached (as advertized in JMX console), prune is triggered (CachePrunes is incremented in JMX console) but cache size (Units) stays around limit, never falls to (default) low-units mark (587202560 kb).
    Is this normal behaviour?  I thought when high-units mark was reached, size was brought down to low-units mark.

    I think that it is something wrong with kernel and graphic drivers but i'm not able to solve it from the beginning of using of Arch by me.
    I'm not so sure this issue is software-related only because in my case it seems the laptop screen enters power-saving mode (10-min timeout) on its own without any events logged (as shown by dmesg) so my next thought was OK, I'm going to get rid of this issue disabling the screen power-saving timeout in the BIOS and set it to never power down or something like that and from then on managing power mode manually; ie: when I want to power down I will just use systemctl suspend/hibernate which work fine ... problem is: there are no related options in my BIOS for such timeout.
    The only timeouts I have are in /etc/systemd/logind.conf set to 30min (#IdleActionSec) (commented) by default so these are not in effect because the screens goes blank after 10m which is less than the (default) 30m in logind. Maybe setting loggind to 9m (un-commented) to catch the event before the machine-default one ?
    IdleActionSec=9min
    IdleAction=suspend
    Will check it and report back.

  • Can I override high-units with a  'system-property' attribute?

    In an attempt to centralize property configurations, can I override the high-units with a system-override?
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <internal-cache-scheme>
    <local-scheme>
    *<high-units system-property="high.for.prod">2G</high-units>*
    <unit-calculator>BINARY</unit-calculator>
    <expiry-delay>0</expiry-delay>
    </local-scheme>
    </internal-cache-scheme>

    You should be able to bu the correct syntax is...
    <high-units system-property="high.for.prod">2G</high-units>...without the underscores
    JK

  • Binary memory calculator on near cahce

    I am trying to cap cache size on client using near cache.
         <near-scheme>
                   <scheme-name>extend-near</scheme-name>
                   <front-scheme>
                        <local-scheme>
                             <high-units>500M</high-units>
                             <unit-calculator>BINARY</unit-calculator>
                        </local-scheme>
                   </front-scheme>
                   <back-scheme>
                        <remote-cache-scheme>
                             <scheme-ref>extend-dist</scheme-ref>
                        </remote-cache-scheme>
                   </back-scheme>
                   <invalidation-strategy>all</invalidation-strategy>
              </near-scheme>
    with above configuration i see this exception
    java.lang.IllegalArgumentException: Unsupported key or value: Key=1269, Value=com.starwood.valhalla.sherlock.dto.PropertyContentType@19be19be
    In cache, key is integer and value is java bean. As per doc, both supposed to be [Binary Objects|http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/cache/BinaryMemoryCalculator.html].
    But is there any way to make Binary calculator work with near cache with out modifying code?
    BTW, Binary calculator working fine when configured on server side with distributed cache, this is implemented for reporting purposes
              <distributed-scheme>
         <scheme-name>dist-default</scheme-name>
         <backing-map-scheme>
              <local-scheme>
                   <unit-calculator>BINARY</unit-calculator>
                   <unit-factor>1024</unit-factor>
         </local-scheme>
         </backing-map-scheme>
         <autostart>true</autostart>
              </distributed-scheme>
    Kiran

    Hi Kiran,
    The "front cache" of a near cache stores data in object form. Therefore you can not use BINARY unit-calculator. You need to use "FIXED" type and figure the unit size by dividing 500M/object size in byte.
    -Luk

  • Unable to load the pof configuration

    Hi all,
    Im trying with pof serialization but unable to load the pof configuration and im getting the following error:
    2013-06-12 14:41:49,582 [catalina-exec-1] ERROR com.distcachedemo.KnCacheDemoServlet - doPost(HttpServletRequest, HttpServletResponse)::
    (Wrapped) java.io.NotSerializableException: com.distcachedemo.dto.KnMasterListResponse
        at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:215)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterValueToBinary.convert(PartitionedCache.CDB:3)
        at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1674)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.put(PartitionedCache.CDB:1)
        at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
        at com.distcachedemo.KnCorpContactInfoControllerDemo.getMasterList(KnCorpContactInfoControllerDemo.java:183)
        at com.distcachedemo.KnCacheDemoServlet.doPost(KnCacheDemoServlet.java:60)
    Please let me know what is that i need to correct in the below:
    NOTE: I have also tried Proxy Scheme with serializer and it too did not work
              From the coherence logs i havent found the log of POF configuration being loaded.
    Configuration used:
    ============
    cache-config.xml::
    <?xml version="1.0"?>
    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
       xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
       <caching-scheme-mapping>
          <cache-mapping>
             <cache-name>nspoc*</cache-name>
             <scheme-name>distributed-ns</scheme-name>
          </cache-mapping>
         <cache-mapping>
             <cache-name>poc*</cache-name>
             <scheme-name>distributed</scheme-name>
          </cache-mapping>
       </caching-scheme-mapping>
    <caching-schemes>
          <distributed-scheme>
             <scheme-name>distributed-ns</scheme-name>
             <service-name>DistributedCache-ns</service-name>
             <thread-count>4</thread-count>
             <request-timeout>60s</request-timeout>
             <backing-map-scheme>
                        <external-scheme>
                            <nio-memory-manager>
                                <initial-size>1MB</initial-size>
                                <maximum-size>100MB</maximum-size>
                            </nio-memory-manager>
                            <high-units>100</high-units>
                            <unit-calculator>BINARY</unit-calculator>
                            <unit-factor>1048576</unit-factor>
                        </external-scheme>
             </backing-map-scheme>
             <autostart>true</autostart>
          </distributed-scheme>
          <distributed-scheme>
             <scheme-name>distributed</scheme-name>
             <service-name>DistributedCache</service-name>
             <thread-count>4</thread-count>
             <request-timeout>60s</request-timeout>
             <backing-map-scheme>
                <read-write-backing-map-scheme>
                    <internal-cache-scheme>
                        <external-scheme>
                            <nio-memory-manager>
                                <initial-size>1MB</initial-size>
                                <maximum-size>100MB</maximum-size>
                            </nio-memory-manager>
                            <high-units>100</high-units>
                            <unit-calculator>BINARY</unit-calculator>
                            <unit-factor>1048576</unit-factor>
                        </external-scheme>
                  </internal-cache-scheme>
                  <cachestore-scheme>
                    <class-scheme>
                        <class-factory-name>com.distcachedemo.KnPocCacheStoreFactory</class-factory-name>
                        <method-name>loadCacheStore</method-name>
                        <init-params>
                          <init-param>
                            <param-type>java.lang.String</param-type>
                            <param-value>{cache-name}</param-value>
                          </init-param>
                        </init-params>
                    </class-scheme>
                   </cachestore-scheme>
                </read-write-backing-map-scheme>
             </backing-map-scheme>
             <autostart>true</autostart>
          </distributed-scheme>
          <local-scheme>
             <scheme-name>LocalSizeLimited</scheme-name>
             <eviction-policy>LRU</eviction-policy>
             <high-units>5000</high-units>
             <expiry-delay>1h</expiry-delay>
          </local-scheme>
       </caching-schemes>
    </cache-config>
    =================
    tangosol-coherence-override.xml:
    <?xml version='1.0'?>
    <coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
       xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-operational-config coherence-operational-config.xsd">
       <cluster-config>
          <member-identity>
             <cluster-name system-property="tangosol.coherence.cluster">kn_test</cluster-name>
          </member-identity>
          <unicast-listener>
             <well-known-addresses>
                <socket-address id="719">
                   <address>192.168.7.19</address>
                   <port>8088</port>
                </socket-address>
                <socket-address id="3246">
                   <address>192.168.3.246</address>
                   <port>8088</port>
                </socket-address>
                <socket-address id="77">
                   <address>192.168.7.7</address>
                   <port>8088</port>
                </socket-address>
             </well-known-addresses>
             <address system-property="tangosol.coherence.localhost">192.168.7.7</address>
             <port system-property="tangosol.coherence.localport">8088</port>
             <port-auto-adjust system-property="tangosol.coherence.localport.adjust">true</port-auto-adjust> 
          </unicast-listener>
    <serializers>
          <serializer id="java">
             <class-name>com.tangosol.io.DefaultSerializer</class-name>
          </serializer>
          <serializer id="pof">
             <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
            <init-params>
                <init-param>
                   <param-type>String</param-type>
                   <param-value>pof-config.xml</param-value>
                </init-param>
             </init-params>
          </serializer>
       </serializers>
       </cluster-config>
       <configurable-cache-factory-config>
          <init-params>
             <init-param>
                <param-type>java.lang.String</param-type>
                <param-value system-property="tangosol.coherence.cacheconfig">cache-config.xml</param-value>
             </init-param>
          </init-params>
       </configurable-cache-factory-config>
    </coherence>
    ======================
    pof-config.xml:
    <?xml version='1.0'?>
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
       xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config
       coherence-pof-config.xsd">
       <user-type-list>
          <include>coherence-pof-config.xml</include>
          <user-type>
            <type-id>1001</type-id>
            <class-name>com.distcachedemo.dto.KnMasterListResponse</class-name>
          </user-type>
       </user-type-list>
    </pof-config>
    ============
    Java Code:
    package com.distcachedemo.dto;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    import java.io.IOException;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Map;
    public class KnMasterListResponse implements PortableObject {
      private static final long serialVersionUID = -9114918011531875153L;
      private KnHierarchyListDTO hierarchyListDTO;
      private Map subsMap;
      public KnHierarchyListDTO getHierarchyListDTO() {
      return hierarchyListDTO;
      public void setHierarchyListDTO(KnHierarchyListDTO hierarchyListDTO) {
      this.hierarchyListDTO = hierarchyListDTO;
      public Map getSubsMap() {
      return subsMap;
      public void setSubsMap(Map subsMap) {
      this.subsMap = subsMap;
      public String toString() {
      StringBuilder strBuffer = new StringBuilder(100);
      if (hierarchyListDTO.getHierachyDTOs() != null) {
      strBuffer.append(" hierarchyListDTO - ").append(hierarchyListDTO.getHierachyDTOs().size());
      if (subsMap != null) {
      strBuffer.append(" subsMap - ").append(subsMap.size());
      return strBuffer.toString();
      @Override
      public void readExternal(PofReader pofReader) throws IOException {
      subsMap = pofReader.readMap(0, new HashMap<>());
      hierarchyListDTO = (KnHierarchyListDTO) pofReader.readObject(1);
      @Override
      public void writeExternal(PofWriter pofWriter) throws IOException {
      pofWriter.writeMap(0, subsMap);
      pofWriter.writeObject(1, hierarchyListDTO);
    Thanks,
    Ravi Shanker

    Hi Ravi,
    it is generally recommended that all new classes support POF in this or that way. This or that means either implementing PortableObject or to provide a PofSerializer implementation to be able to optimally serialize their state. Obviously it is not always possible but you should try to achieve that.
    If it is not possible, then you can still convert them to byte[] or String by some other means. If that other means is Java serialization, then Coherence provides a different PofContext implementation (SafeConfigurablePofContext) which you can use instead of ConfigurablePofContext and which is able to fall back to Java serialization for Serializable classes (and also for types not registered in POF configuration but which implement PortableObject). However it is recommended that SafeConfigurablePofContext is not used in production, typically because Java serialization is generally inferior to POF serialization when looking at performance and serialized size, and SafeConfigurablePofContext does not force you to do the right thing, and finally because Java serialization is not platform-independent whereas POF is.
    Best regards,
    Rob

  • Compacting the cache-config.xml for multiple cache-store

    Hi,
    I have a cache-config.xml that has various ReadWriteBackingMaps with different CacheLoader implementations. I was wondering of the best way to compact this xml using the scheme-ref tag, as all I really need is schemes, with different cache stores. e.g. I have an InstrumentCacheStore and a CurrencyCacheStore .. which invoke different CacheLoaders. they are both distributed caches.
    I thought the below would work, but it dosen't.. :( when loading a currency, the InstrumentCacheStore gets invoked.
    is there a way to compact this XML? Else, for 6 different cache loaders that I have, do I have to specify the whole distributed-scheme again and again?
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>instrument-*</cache-name>
    <scheme-name>distributed-instrument-scheme</scheme-name>
    </cache-mapping>
    <cache-mapping>
    <cache-name>currency-*</cache-name>
    <scheme-name>distributed-currency-scheme</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributed-instrument-scheme</scheme-name>
    <scheme-ref>distributed-scheme</scheme-ref>
    </distributed-scheme>
    <distributed-scheme>
    <scheme-name>distributed-currency-scheme</scheme-name>
    <scheme-ref>distributed-scheme</scheme-ref>
    <!-- THIS DOES NOT OVERRIDE THE DEFAULT distributed-scheme? -->
    <cachestore-scheme>
    <class-scheme>
    <class-name>coherence.cachestore.CurrencyCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </distributed-scheme>
    <distributed-scheme>
    <scheme-name>distributed-scheme</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-ref>LocalSizeLimited</scheme-ref>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>coherence.cachestore.InstrumentCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <serializer>
    <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
    </serializer>
    <partition-count>5557</partition-count>
    <backup-count>1</backup-count>
    <thread-count>10</thread-count>
    <autostart>true</autostart>
    </distributed-scheme>
    <local-scheme>
    <scheme-name>LocalSizeLimited</scheme-name>
    <high-units>500000000</high-units>
    <low-units>10000</low-units>
    <unit-calculator>BINARY</unit-calculator>
    </local-scheme>
    </caching-schemes>
    </cache-config>
    --------------------------------------------------------------------------------------------------------------

    There are two possible ways to sort this out
    1. The cache configuration for the distributed-currency-scheme shown in the original post is wrong and does not correctly override the cache store, it should look like this:.
    <distributed-scheme>
      <scheme-name>distributed-currency-scheme</scheme-name>
      <scheme-ref>distributed-scheme</scheme-ref>
      <backing-map-scheme>
        <read-write-backing-map-scheme>
          <internal-cache-scheme>
            <local-scheme>
              <scheme-ref>LocalSizeLimited</scheme-ref>
            </local-scheme>
          </internal-cache-scheme>
          <cachestore-scheme>
            <class-scheme>
              <class-name>coherence.examples.CurrencyCacheStore</class-name>
            </class-scheme>
          </cachestore-scheme>
        </read-write-backing-map-scheme>
      </backing-map-scheme>
    </distributed-scheme> 2. You can use a single scheme and parameterise it like this:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
      <caching-scheme-mapping>
        <cache-mapping>
          <cache-name>instrument-*</cache-name>
          <scheme-name>distributed-scheme</scheme-name>
          <init-params>
            <init-param>
              <param-name>cache-store-class-name</param-name>
              <param-value>coherence.examples.InstrumentCacheStore</param-value>
            </init-param>
          </init-params>
        </cache-mapping>
        <cache-mapping>
          <cache-name>currency-*</cache-name>
          <scheme-name>distributed-scheme</scheme-name>
          <init-params>
            <init-param>
              <param-name>cache-store-class-name</param-name>
              <param-value>coherence.examples.CurrencyCacheStore</param-value>
            </init-param>
          </init-params>
        </cache-mapping>
      </caching-scheme-mapping>
      <caching-schemes>
        <distributed-scheme>
          <scheme-name>distributed-scheme</scheme-name>
          <service-name>DistributedCache</service-name>
          <backing-map-scheme>
            <read-write-backing-map-scheme>
              <internal-cache-scheme>
                <local-scheme>
                  <scheme-ref>LocalSizeLimited</scheme-ref>
                </local-scheme>
              </internal-cache-scheme>
              <cachestore-scheme>
                <class-scheme>
                  <class-name>{cache-store-class-name}</class-name>
                </class-scheme>
              </cachestore-scheme>
            </read-write-backing-map-scheme>
          </backing-map-scheme>
          <serializer>
            <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
          </serializer>
          <partition-count>5557</partition-count>
          <backup-count>1</backup-count>
          <thread-count>10</thread-count>
          <autostart>true</autostart>
        </distributed-scheme>
        <local-scheme>
          <scheme-name>LocalSizeLimited</scheme-name>
          <high-units>500000000</high-units>
          <low-units>10000</low-units>
          <unit-calculator>BINARY</unit-calculator>
        </local-scheme>
      </caching-schemes>
    </cache-config>Parameter names from the init-params part of each cache mapping can be used inside curly brackets in the cache scheme part.
    Hope that helps,
    JK

Maybe you are looking for

  • 5508 WLC on 7.4MR2- Clients getting Disconnected using CWA

    We are experiencing an issue with clients getting disconnected/time out from a wlan doing CWA.  The clients are iphones.  A debug client shows the error(Unknown Policy Timeout). This particular WLAN is used for provisioning with ISE. ISE shows the us

  • Problem with ORACLE_SID

    I am not able startup a database in nomount state for particular ORACLE_SID. It seems it doesn't like the ORACLE_SID I set to. It's throwing following error ORA-07345: The datafile name must not contain the string '..'. Steps I did like follows 1) ex

  • Some images not loaded in flex Image Control.

    Hi,     Can anybody help me. I am loading friends album image in flex Image control. Its strange that some image do not load even the path is fine and I can open in browser.  I think there is time out issue. Thanks in advance.

  • Seeking advice: project sharing

    For five years, I've produced a quarterly newsletter (for teh day job) that averages 28 pages. In 2014, I'm preparing to change the project by lowering print run and page count and making it monthly - so we'll be producing the same number of pages in

  • Count Requirement

    Hi Gurus, Can you help me with my requirement. I have this report that has Summary and Details section. My issue is I can't get the correct count of my status. My Summary Section is not match with my Details section. In my SQL query output I have thi