Confining objects to a particular node in a distributed cluster

I have a partitioned cache for a cluster and there are n nodes(jvm instance) within that particular cluster. Both the data and backup data are randomly and evenly spread accross different nodes. Is there any way to put a constraint based on the cached object value (eg object with value >5) or the newly cached object should always reside in a particular node? Is partitioned near cache supports that facility? I want that object to be loaded in a particular user preffered node for the first time itself irrespective of where it is referred?

Hi,
there is support to a somewhat similar functionality, but it is impossible to exactly achieve what you want.
First of all, Coherence places and locates objects in the partitioned caches (distributed cache and near cache are partitioned caches) strictly based on the key. So it is impossible to achieve data placement based on any part of the value. Placement can depend only based on the key.
Second: when nodes come and go, data in a partitioned cache moves around with the granularity of these movements being the partition. There is a way to influence which partition a specific key ends up or rather to influence that certain keys end up in the same partition, but the placement of partitions on nodes is not static, it varies over time. However you can determine which node a certain partition resides at the time of asking. Of course it might change right afterwards :-).
So what you can do is you can ensure that groups of your keys end up on the same partition and hence they always reside on the same node.
To achieve this either your keys must implement KeyAssociation or you must define a KeyAssociator instance for your cache. When this is done, then you can optimize your queries and aggregations by using the KeyAssociatedFilter or PartitionFilter to execute only on certain nodes or partitions.
For more about this, look at the following Wiki page:
http://wiki.tangosol.com/display/COH34UG/Data+Affinity
Best regards,
Robert

Similar Messages

  • How can i change the particular node color in Jtree?

    I have constructed the tree.i dont know how to set the color for the particular node then how can i change the particular node icon depends on some conditions like if we will give the input whether it is available in jtree that node icon only changed.Anyone please help me as soon as possible.

    hi,
    i saw that tutorial.from that book i dont get the particular node cell renderer.i got a cell renderer for tree only.i attached my code in this mail.pls see and help me if u will do
    mport pack.Prop;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Font;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import java.util.Set;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.text.Position;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class ReadProperty3 extends JFrame{
    String str,key;
    static JTree tree;
    static Vector v;
    StringTokenizer st;
    static DefaultMutableTreeNode root;
    DefaultMutableTreeNode t;     
    public Object[] o;
    public static void main(String[] args) throws IOException {
    ReadProperty3 r = new ReadProperty3();
    Prop p=new Prop();
    JFrame f=new JFrame();
    p.show();
    Object[] o=v.toArray();
    int startRow = 0;
    String prefix =p.s;
    TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
    //if(prefix.equals(root.getChildAt(0).toString()))
    if(prefix.equals("2000"))
         System.out.println("Node 2000 found");
         else if(prefix.equals("3000"))
              System.out.println("Node 3000 found");
         else if(prefix.equals("4000"))
              System.out.println("Node 4000 found");
         else
              System.out.println("Node not found");
         for(int i=0;i<v.size();i++)
              //((DefaultTreeModel)tree.getModel()).reload();
              DefaultTreeCellRenderer ren=(DefaultTreeCellRenderer)tree.getCellRenderer();
              Icon openIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon closedIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon leafIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/read.gif");
              if(o[0].equals(p.s))
                   ren.setBackgroundSelectionColor(Color.MAGENTA);
                   ren.setBackgroundNonSelectionColor(Color.YELLOW);
                   //ren.setTextSelectionColor(Color.YELLOW);
                   //ren.setTextNonSelectionColor(Color.BLUE);
                   ren.setClosedIcon(closedIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,14));
              else if(o[1].equals(p.s))
                   ren.setLeafIcon(leafIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,10));
                   UIManager.put("Tree.leafIcon", leafIcon);
              else if(o[2].equals(p.s))
                   ren.setOpenIcon(openIcon);
                   ren.setFont(new Font("Dialog",Font.BOLD,9));
    public ReadProperty3(){
         super("JTree With Properties");
         try{
    int c = 0;
    while(c == 0){
    c = 1;
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter file name which has properties extension :");
    str = bf.readLine();
    File f = new File(str + ".properties");
    if(f.exists()){
    Properties pro = new Properties();
    FileInputStream in = new FileInputStream(f);
    pro.load(in);
    System.out.println("Key: " + pro.keySet());
    System.out.print("Enter Key : ");
    key = bf.readLine();
    String p = pro.getProperty(key);
    st = new StringTokenizer(p,"=,");
    root=new DefaultMutableTreeNode(key);
    v=new Vector();
    while(st.hasMoreTokens())
         String val=st.nextToken();
         v.add(val);
         o=v.toArray();
         System.out.println(val);
         t=new DefaultMutableTreeNode(val);
         root.add(t);
         tree=new JTree(root);
         tree.setEditable(true);
         JScrollPane jp=new JScrollPane(tree);
         // tree.setCellRenderer(new CellRenderer());
         Container content=getContentPane();
         content.add(jp,BorderLayout.CENTER);
    setSize(250,275);
    setVisible(true);
    addWindowListener(new ExitListener());
    else{
    c = 0;
    System.out.println("File not found!");
    catch(IOException e){
    System.out.println(e.getMessage());
    }

  • Servlet to count the number of occurances of a particular node

    Hi
    I am looking for a servlet which will count the number of a particular node which I have supplied of an XML file.
    Can somebody please help me with this?
    Thankyou

    If you are using Xerces, after you have parsed your XML files using a DOMParser, get the document object from the parser like
    Document document = parser.getDocument();
    And then use the command getElementsByTagName("*"); // for all elements
    it will return the node list object (NodeList) which you can get the count (nodeList.getLength())

  • In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.

  • How to get the connected Adapter Object for a particular BDoc Type?

    Hi All,
    I have a scenario in which CRM system is connected to ERP system.
    In SMW01 transaction, I can see one BDoc with BUS_TRANS_MSG as the BDoc Type in CRM.
    Now, how do I get to know if this one BDoc is a SALESDOCUMENT or SALESCONTRACT.
    Is there any way thorough which I can get to know the Adapter Object for this particular BDoc.
    Regards,
    Madhuri

    Hi Madhuri,
               Happy new year.
    In Transaction : R3AC1.
    You can observe the Linked BDOC for the adaptor objects. For example Sales docuemnt and Sales contrcat will have the same linked BDOC as "BUS_TRANS_MSG".
    If you see an error in SMW01, you want to find whether it is salesdocument or contract.
    1. Please take the Queue name from SMW01.
    from the queue name you can find whether it is sales contract or sales document.
    Queue name is customized in tables: SMOFQFIND.
    I hope this helps you.
    regards,
    Sri...

  • How to create a new object for a particular class?

    Hi,
      Can anybody please tell  the steps for creating a new object for a particular class.
    Thanks,
    Sreeja

    Declare the object as TYPE REF TO the class and use the CREATE OBJECT statement to create an object.
    DATA <obj_name> TYPE REF TO <class_name>.
    CREATE OBJECT <obj_name>.
    Please mark points if the solution was useful.
    Regards,
    Manoj

  • How to use xpath function to select some particular  nodes

    Dear experts:
    does abap supports  xpath  to sellect particular  nodes  according some node value or condition, i know other  programe language  supports the function selectNode(xpath expression)  , does abap or have the api to support it?
    and i know there is a class support  the xpath but it's not work., the class this:cl_xslt_processor
    to clarify my point. i take a ex.
    the xml doc is follow:
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:MT_CRM_Req xmlns:n0="http://gome.com/CRM/CRM/Outbound" xmlns:prx="urn:sap.com:proxy:DC0:/1SAI/TAS05C79364B9D0DC5F6738:701:2010/02/19">
    <company name="hp">
    <dep name="gds">
    <empolyeeid>123</empolyeeid>
    </dep>
    <dep name="its">
    <empolyeeid>148</empolyeeid>
    </dep>
    </company>
    <company name="foxconn">
    <dep name="fih">
    <empolyeeid>569</empolyeeid>
    </dep>
    </company>
      </n0:MT_CRM_Req>
    i  want to  select the employee 's company name who empolyee id is 123
    i use the method  ,and the code is :
    l_xslt->set_expression(
    expression = '/n0:MT_CRM_Req/n0:company[n0:dep/n0:empolyeeid=123]'
    nsdeclarations = 'n0 http://gome.com/CRM/CRM/Outbound'
    l_xslt->run('').
    nodes = l_xslt->get_nodes( ).
    LEN = nodes->GET_LENGTH( ) .
    WRITE LEN.
    but no nodes return.
    is anybody knows what's wrong with it? or there is some other api to manipulate the xml dom.
    best regrds!

    Hello Kevin ,
    i think you can get those details , have a look at program BCCIIXMLT1, i think this program will give you some idea to handle * manage xml docs.
    along with that program ...you need to put filter
    *---creating filers.
      filter   = document->create_filter_name( name = 'Company' ).
      iterator = document->create_iterator_filtered( filter ).
      main_node =  document.
    *---processing document.
      perform print_node using main_node p_flag.
    let me know if you need anymore help.
    regards
    Prabhu

  • Display a particular node of Hierarchy in the Report.

    Hi , all
    I have an urgent requirement that i have to  display only a particular node(5) of Hierarchy in the Bw Report , I have tried different options available in the Hierarchy tab (That is Expand to level 5 , Position of lower node - Above , Value of posted node - Hide ) . But stil it is displaying 5 and then 4 node , but i don't want that 4 node .
    Can anybody gine me some useful suggestion .
    Thanks in advance..

    Hi Akash,
    - To show only particular nodes of a hierarchy in the Excel sheet:
    Step 1: include the base characteristic
    Step 2: select the hierarchy (properties of the characteristic) - (display key only)
    Step 3: user restrict (from context menu of the characteristic) on the nodes that you want to display.
    Step 4: expand to level: 1 (properites of the characteristics)
    This should serve the purpose.  I know it is a little late, but it might be helpful in the future

  • How to rename a particular node in an xml

    Hi All,
    I have a table called xmltable and I have inserted the below row in to the table,
    INSERT INTO XMLTABLE VALUES (4,'<?xml version="1.0"?>
    <Node_1 empID="202" empName="Pro1" oper="Update">
    <Node_2 empID="20" empName="Pro2" oper="Update">
    <Node_3 empID="2" empName="Pro3" oper="Update">
    <Node_4 empID="22" empName="Pro4" oper="Update">
    <Node_5 empID="12" empName="Pro5" oper="Delete"/>
    <Node_6 empID="223" empName="Pro6" oper="Insert"/>
    <Node_7 empID="201" empName="Pro7" oper="All"/>
    </Node_4>
    </Node_3>
    </Node_2>
    </Node_1>');
    I Have created a sequence seq_i
    I want to replace a particular node with next sequence seq_i,
    Ex: - Assume I want to replace only 'Node_2' with 'seq_i.nextval',
    Can any one help me in acheiving this?
    Thanks,

    Sorry for the inconvenience, Below Find detailed explanation of the issue,
    INSERT INTO XMLTABLE VALUES (4,'<?xml version="1.0"?>
    <Node_1 empID="202" empName="Pro1" oper="Update">
    <Node_2 empID="20" empName="Pro2" oper="Update">
    <Bode_3 empID="2" empName="Pro3" oper="Update">
    <Bode_4 empID="22" empName="Pro4" oper="Update">
    <Bode_5 empID="12" empName="Pro5" oper="Delete"/>
    <Bode_6 empID="223" empName="Pro6" oper="Insert"/>
    <Bode_7 empID="201" empName="Pro7" oper="All"/>
    <Node_3 empID="21" empName="Pro71" oper="ll">
    </Bode_4>
    </Bode_3>
    </Node_2>
    </Node_1>');
    I have a sequence seq_i
    seq_i start with 1 increment by 1
    am able to display output as below,
    Node|EMPID|OPER|EMPNAME|MGRID
    Node_1|202|Update|Pro1|Null
    Node_2|20|Update|Pro2|Node_1
    Bode_3|2|Update|Pro3|Node_2
    Bode_4|22|Update|Pro4|Bode_3
    Bode_5|12|Delete|Pro5|Bode_4
    Bode_6|223|Insert|Pro6|Bode_4
    Bode_7|201|All|Pro7|Bode_4
    Node_3|21|ll|Pro71|Bode_4
    Now I want below one as output
    All nodes starting with Bode_, I need to replace that with sequence, seq_i
    so for the seq_i (starting with i and incrementing by 1)
    Node|EMPID|OPER|EMPNAME|MGRID
    Node_1|202|Update|Pro1|Null
    Node_2|20|Update|Pro2|Node_1
    1|2|Update|Pro3|Node_2
    2|22|Update|Pro4|1
    3|12|Delete|Pro5|2
    4|223|Insert|Pro6|2
    5|201|All|Pro7|2
    Node_3|21|ll|Pro71|2
    Thanks,

  • Debug a particular node of SMARTFORM

    Hai Fellas,
    How to debug a particular node of Smartforms.
    I dont want to debug it from the begining.
    There is a restiction I can't add anything as the code is in Quality server.
    i.e no break points can be hardcoded using program line.
    Best Regards,
    Suvendu.

    Hi,
    Just for debugging you cant write break-point statement and u cant transport,the best practice is go to smartforms ,there will be a option find the function module.Go to Se37 give the function module name,go to display mode,search for ur field or internal table or a work area,keep the break-point ,and then run the smart form ,this is way that we can debug in quality and production systems
    Thanks
    Santhiya B

  • How to search in particular node

    hi
    kindly tell how can we limit our search to a particular node instaed of the whole content
    thanks in advance

    Since it's all text, why not use a real quick Match Pattern (or Regular Expression, but you don't need that much power here), see attached.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ
    Attachments:
    Two-stage match demo.vi ‏8 KB

  • Oracle Rac - Targetting clients to particular nodes?

    We have a deployment case that wanted to find out best practices.
    Currently there is a two node RAC setup.
    We have an application that on one side -- is a high write, minor read component -- and another side which is mostly read and minor write. Each component uses multiple connections and have logical separations of what tables they are writing to.
    The current proposed solution is to target the high write components to one node instance -- while distributing the other component, which does A LOT of reading and some writing, across both RAC instances.
    The question is what is the best paradigm for this: Any documentation of when to target components to single instances versus letting RAC do it's own distribution/etc. There are different user accounts for the components that do the high volume writing versus the selecting/etc..
    Thanks.

    Hi,
    The question is what is the best paradigm for this: Any documentation of when to target components to single instances versus letting RAC do it's own distribution/etc. There are different user accounts for the components that do the high volume writing versus the selecting/etc..I'm assuming you're using version 10g or later. On Oracle RAC 9i you don't have this feature.
    You can direct connections to nodes that have characteristics in common workload using Oracle Services.
    To manage workloads or a group of applications, you can define services that you assign to a particular application or to a subset of an application's operations. You can also group work by type under services.
    Oracle recommends that all users who share a service have the same service level requirements. You can define specific characteristics for services and each service can be a separate unit of work. There are many options that you can take advantage of when using services. Although you do not have to implement these options, using them helps optimize application performance.
    When you define a service, you define which instances normally support that service. These are known as the PREFERRED instances. You can also define other instances to support a service if the service's preferred instance fails. These are known as AVAILABLE instances.
    Services are integrated with Resource Manager, which enables you to restrict the resources that are used by the users who connect with a service in an instance. The Resource Manager enables you to map a consumer group to a service so that users who connect with the service are members of the specified consumer group.
    Using a Service (11.1 or later) when you execute a SQL statement in parallel, the parallel processes only run on the instances that offer the service with which you originally connected to the database. This is the default behavior. This does not affect other parallel operations such as parallel recovery or the processing of GV$ queries. To override this behavior, set a value for the PARALLEL_INSTANCE_GROUP initialization parameter.
    You'll have much more concept to learn how it works than to know how to configure.
    Understanding how it works is essential to configure the services properly.
    http://download.oracle.com/docs/cd/B28359_01/rac.111/b28254/hafeats.htm#CHDGEBED
    http://www.ardentperf.com/pub/schneider-services.pdf
    Any questions just ask.
    Regards,
    Levi Pereira

  • Reporting on hierarchy particular node

    Hi Gurus,
    The requirement is to allow users to directly enter particular nodes. For example
    WBS element Hierarchy is like this
    WBS element  = A2S00
    Stage 1                 A2S00/01
                                       A2S00/01/01
    Stage 2                 A2S00/02
    Stage 3                 A2S00/03
    create user entry variables like
    WBS element var1 :  A2S00(User will enter like wbs element)
    WBS element var2:   03(User will enter partular for the above WBS element).
    Please can you let me know any other options to achive the above scenario.
    Regards,
    Suresh.

    Hi Suresh.
    So your scenario is that you want to let the user input a hierarchy node first. Then, you want them to select from the particular values for the node the user just inputted, using a variable for each?
    I am not sure if you can achieve this dependency between the value help for the two variables, but maybe it will work with just one variable for the node, where the user inputs the node value and hits F4 - maybe you can simulate the functionality like that? (maybe the input has to be the value and the * fx: P34-A2*)
    Alternatively, if you know for each user, that they only have one or two nodes in the hierarchy that they should report on, you could set it up as an authorization or as user masterdata. Like this, you get the "allowed" node values and you can set the variable up to only display that part of the hierarchy.
    Regards
    Jacob

  • Bor Object for a particular transaction.

    Hi Experts,
    I need to desin a WorkFlow when Invoice is Created,
    How can we find the Object for a Particular transaction.
    Thanks

    Hi raz
    i think it will help you
    Firstly go to Transaction of event trace SWE4 on the event trace
    Secondly go to your transaction create one invoce
    then  go to SWEL it will display the BOR Triggered during the Invoice creation
    In case of any issue please revert back
    Donot forgot to reward points
    Regards
    hitesh

  • Openscript not finding object after a particular web page

    In openscript, i recorder 1 script, while playback it is not identifying the object after a particular web page. The window().exist itself showing false.

    Hi,
    Can you please give more details about your issue???
    Regards,
    Deepu M

Maybe you are looking for

  • Dvd writer/cd writer dvd-=rom hp mediA CENTER PC M7160NPENTIUM D WINDOWS XP

    I Wa wondering if any body new or new how to get the location and purpose of each pin coming from dvd  AND CD

  • PXI 652x DIO Readback?

    I have a PXI 6528 DIO board with TTL output channels that NI claims to have readback capability.  I think I need readback capability to facilitate SE execution steps.  How can readback be accomplished in SE or DAQmx?  A very old LV 6.1 vi example is

  • Config-Archive Issue on PI 1.3

    Hi Everyone,       Customer has recently installed PI 1.3 software, and then used it to back up  or restore devices' config. However, when imported all devices into PI 1.3 by csv template and set up some setting about schedule daily job of configurat

  • Smart Object Question

    I am not a regular to this group and I have to admit I am a little behind with my Photoshop learning curve. I just started going thru some info on smart objects and I am really confused about where these smart objects get saved. When you go to edit t

  • Mac to pc compatibility problem

    I can't open a quicktime movie made on a mac on my pc. It seems as though I'm missing a codec but I have no idea which one   Windows XP