TotalOrderPartitioner and mrjob - hadoop-streaming

How does one specify the TotalOrderPartitioner when using mrjob? Is this the default, or must it be specified explicitly? I've seen inconsistent behavior on different data sets.

You can specify it with job.setPartitionerClass(TotalOrderPartitioner.class);
It is not the default partitioner class. The default is the HashPartitioner class.
It's not a very easy partitioning system to use. You must use an InputSampler to pre-sample data from your input when using the TotalOrderPartitioner.
I wrote a very detailed tutorial with examples and illustrations (from beginner to advanced usage) on how to use these here.

Related

In hydra, can I interpolate config from a file without using the defaults list?

Say I have a directory utility_configs that has a bunch of different configurations for different things that are useful in different situations. And then I want to be able to use these different configs in different places. For instance, maybe my model has many different places where I need something that is an "encoder" (really just a bit of network that maps an input to an output). I might have vary different encoders in my utility_configs directory, and I would like to be able to specify any of them anyplace I need an encoder (possibly then adjusting the number of input and output channels or other parameters). I am not seeing how to do this straightforwardly since it seems like the only way you can get data from a different file is using the defaults list. But that's not really a good fit here since I might need multiple different things from utility_configs and in multiple different places (including subconfigs)
You cannot interpolate into a file. Interpolation works on the current config object.
Hydra can compose the config for you, after which you can use interpolation.
You have multiple options:
Have more than one primary config (with a defaults list). You can override which primary config to use via the command line (--config-name|-cn).
Construct your defaults list in an ad-hoc manner via the command line using the +GROUP=OPTION notation (see this).
About using a config in different places, take a look at config packages - which allows you to relocate the content of a config in the composed config object.
I recommend going with 1.

How to calculate or at least constraint the value of tags defined in a stereotype?

To prioritize the engineering effort around Requirements in a defined way, I came to the idea to use the information already added for the FMEA.
For this I have created a Stereotype named fmeaRelevant (will be named better later), which has several Tags.
My target now is to first calculate the averages of all of these Tags and then from these the average RPN, which is again a Tag.
For this, I have already created a ConstrainedProperty, which has the respective ConstrainedParameters and Constraints.
BindingConnectors are created between the ConstrainedParameters of the ConstraintProperty and the Tags of the Stereotype.
The Stereotype is assigned to my Requirements.
However, Open ConstraintView ... does not show me anything.
Is there anything I am missing?
P.S.: I am not sure how to provide something like a source code snippet for model content. If one makes a proposal in a comment, I will add this.
You used binding connectors between stereotype properties and constraint parameters? That should not be possible, since they are on different levels. The parameters are on the model level and the stereotype properties are on the language level.
Of course, Rhapsody sometimes allows strange things, so it might well be, that there is a way to get it running.
The RPN relates to an actual hazordous situation. Your model describes this situation and all values relating to the situation should therefore be value properties of the FMEAitem. This element would be defined in a library. By the way, this is how it's done in the new RAAML-specification, which might be a useful reference.

remove attributes from all objects

I am looking for the easiest way to remove attributes from every class (i.e: created / modified dates and the like) - without having to specify a customer converter on every one of our domain classes.
Additionally - I don't want to do it under normal course - but only when I enable our test case recording feature - so really I need two sets of serialization attributes, one for normal course and one for tests (hence the reason to remove the dates, because they change and I cannot determine if the results are correct).
I have not looked at the source code yet and was hoping to avoid that because I expect it will take me a while to get up to speed on it and was hoping that you could do this through the serialization settings somehow.
Thanks in advance.
Whatty
I found the answer elsewhere - it can be found at Sample ContractResolver that conditionally removes properties from JSON.

How do I represent a multi-valued attribute in an alfresco aspect property?

I wish to extend the person object with additional attributes through an aspect, however several of the aspect properties need to be multi-valued i.e. contain more than one value.
e.g a person's skill set.
How do I achieve this?
What you want to do is define your property with multiple="true" to make it multi-valued. This is detailed in the documentation here.
If you're new to creating Alfesco models, you might find these two wiki pages helpful. The book Professional Alfresco is also recommended, and the modelling section hasn't changed since it was written (though a few other areas have)

What is the purpose of the Agreement field in the PriceDiscTable?

What is the purpose of this field? I am looking to use it for something but I want to make sure it's not contrary to its intended purpose.
It is not used and is not in the form, but it is carried around (to and from the price journal).
It could be used as an (external?) reference number.
To solve similar problems, use the cross reference system. Right-click the field, Add-ins, Cross reference, Used by. Requires an initial update of the cross reference system. I recommend it highly.

Resources