I am new to Aerospike..
My namespace has multiple sets.
I am trying to set different TTLs for different sets in my aerospike dB namespace.
I do not want to use the default-ttl assigned to the namespace, instead I want to set it for each set.
my config
namespace test {
replication-factor 1
memory-size 1G
default-ttl 0
}
i referred to this link https://docs.aerospike.com/server/operations/configure, where it is stating that set specific record policies can be set.
namespace <name> { # Define namespace record policies and storage engine
storage {} # Configure persistence or lack of persistence
set {} # (Optional) Set specific record policies
}
but i am not sure what field should i use to set the ttl for each set. Say, i have two sets in this 'test' namespace named - order and name and i want their ttls to be 2hrs and 6 hours respectively.
Any help would be appreciated.
Thanks in advance
All records in aeropsike belong to a namespace, set is just a metadata, like a tag, on the record. default-ttl is the record's remaining life if the client does not specify at create or update. You cannot assign default-ttl by set in the server configuration. (There are some other set specific config parameters, for e.g. disable-eviction, enable-index that are implemented, default-ttl is not one of them.) But you can achieve the same by writing it in your client application.
For each set you can use a different write policy and in that write policy define the ttl for creating or updating records in that specific set. For e.g. in Java client, it is called WritePolicy.expiration, in seconds. In your specific case, you could do 2 hours default-ttl as server config - so orders will get that as default, for name, in client, when creating or updating records in name set, you override server default to 6 hours using WritePolicy.expiration = 3600.
Related
In my application the users are split in 2 macro categories: Customer and Backoffice, every category has a subset of role, for example MANAGER and USER for Customer type and different ones for the Backoffice type.
So a user could be a Customer with a MANAGER role or a Backoffice with, for example, a SALES role.
Every Spring + Cognito guide on web uses cognito:groups to map the Spring ROLE, but for my case I would need to nest groups which is not possible on Cognito.
I've been thinking to use 2 custom attributes ( writable only by the admin) to set the category and role of the user respectively.
My question is, is there any disadvantage to using attributes instead of the groups?
One major concern is, those custom attributes won't be available as claims in the access token. But groups are available. So If you plan to use acces_token you may have to consider that.
There are some other minor considerations that I can think of, which may or may not be related your implementation:
Maximum number of custom attributes per user pool is 50.
Once created, you can not edit the name, min/max length and mutable property of the custom attribute. Also we can not delete that.
Even though nested groups are not supported in Cognito, is it not an option to create groups like: category_role? example: Customer_ MANAGER?
I want to set conflict domain(incompatibility) on INV org level for Concurrent prog in Oracle Apps.
Suppose we have three orgs A,B,C my concurrent prog name is xyz
xyz should run for all three orgs at a time but not for A and A or B and B or C and C
It is possible as per Oracle AOL document.
Conflict Domains
In Oracle Applications, data is stored in database tables that belong to a particular application. Each table may also contain information used to determine what conditions need to be met to access the individual records. These conditions may consist of one or more of the following data groupings:
SOB - based on the profile option
GL_SET_OF_BOOKS Multiple installations (referred to as MSOB) Multiple Operating units
(determined by profile option MO_OPERATING_UNIT) (referred as MULTIORG).
Multiple Orgs (determined by profile option INV_ORGANIZATION_ID, Used by Manufacturing Applications)
HR may use business group as a conflict resolution domain FA may use FA book
etc...
All programs are assigned a conflict domain when they are submitted. If a domain is defined as part of a parameter the concurrent manager will use it to resolve incompatibilities. If the domain is not defined by a parameter the concurrent manager uses the value defined for the profile option Concurrent:Conflicts Domain. Lastly, if the domain is not provided by a program parameter and the Concurrent:Conflicts Domain profile option has not been defined the 'Standard' domain is used. The Standard domain is the default for all requests.
All programs use the Standard conflict domain unless a value is defined for the profile option Concurrent:Conflicts Domain or a conflict domain is defined through a program parameter.
You can refer the following links for further details.
https://docs.oracle.com/cd/A60725_05/html/comnls/us/fnd/incomp01.htm
https://docs.oracle.com/cd/A60725_05/html/comnls/us/fnd/incomp02.htm
Regards,
Sivabalanarayanan L
We are trying to set up cache expiration in Pivotal Cloud Cache, using Gemfire. We have set up our region in PCF:
Cluster-0 gfsh>describe region --name=/CartTest
Type | Name | Value
------ | ----------------------- | ---------
Region | data-policy | PARTITION
| entry-idle-time.timeout | 60
| size | 0
| statistics-enabled | true
| entry-idle-time.action | DESTROY
When we create our Cart object, it is written to the cache (we can
see it in the size entry above).
If we access our object from our code, it does not seem to be updating the access time for the entry. For instance:
#11:00:00 - create entry
#11:00:30 - access entry
#11:01:00 - entry is gone
I would have expected the entry to still exist until 11:01:30 (I'm using ridiculously short timeouts just for testing). The idle time almost seems to be acting just like Time-To-Live. When we look at the lastAccessTime for the region using gfsh, it is not being updated.
Any idea what I'm doing wrong here?
Few things to verify.
Can you please share code showing how you store data in PCC regions ?
Is the region name correct ? Since you are using region CarTest in gfsh your #Region annotation (assuming you are using spring-data-gemfire on the client side) should also be using CarTest region name.
Easy way to put data using SDG (spring-data-gemfire) is via Spring Data Repository abstraction.
Please refer sample application here. Specifically domain class can be created like here and repository can be created like here
CORRECTION: The reason the lastAccessedTime was not being updated was because we were not getting the entry via the ID field, we were searching on two other fields in the object. When we took those two fields and created a composite key, and made it the #Id field, then the time was updated when we retrieved the object.
With partitioned Gemfire regions, any access to a secondary partition does not update the lastAccessedTime of the primary. So this won't do what we want, we'll need to add some code.
I am using Chef12 to mange Users and SSH keys.
I have followed this tutorial:
https://blog.chef.io/2014/07/10/managing-users-and-ssh-keys-in-a-hybrid-world/
It worked fine.
Now problem is , user cookbook which was used in this process by default it takes data bag named users.
I have a data bag named users but this time i want to a different set of users which is in a different data bag.
But it takes only data bag name "users".
How can i pass this data bag to be used while bootstrapping a node?
If you check the README in the users cookbook, you will see that you can provide data_bag parameter to the user_manage resource.
users_manage 'GROUPNAME' do
group_id GROUPID
action [:create]
data_bag 'DATABAG_NAME'
end
I want to create my custom module multi store compatible. I want to get the value from my custom database table as per configuration scope. While adding the values to the database table, i have specified the scope_id and scope like as Magento does in the core_config_data table. Now how can i fetch those inserted value from the table according to the selected website on the front end.
I have the following database value snippet.
ID value scope_id scope
1 test 0 default
2 test1 4 store
3 test12 5 website
Can anybody help me in this? Thanks
It is not so easy to reuse Magento's config loading for your own needs.
What you want is to inherit your values from default -> website -> store (if not overwritten in there).
Magento converts the database config to the internal XML representation in Mage_Core_Model_Resource_Config::loadToXml and does the merging and inheritance logic in there.
The inheritance logic is all in the loadToXml() function - so you could implement something similar if you want to take the same approach and build your values for each store scope.
If you simply need to get one value for a specific scope you just have to read the database row with that store, if not found with the website the store is in, if not found the default value.