Attaching node labels in spot instance - ambari

I have setup a ambari cluster with my compute nodes as spot instances (AWS)
I have also attached node labels to my spot instance.
The problem with the spot instance is that it may go anytime and hence my node labels also go away with it.
Is there a way wherein I can have my compute nodes as spot and whenever a spot shuts down and a new one comes up, a node label is attached

If you are using cloudbreak, you can add tags as part of the deployment cli json. So, when the autoscaling/resizing happens it picks up these tags and builds the host with the same tags.
Example below:
"tags": {
"userDefinedTags": {
"app_name": "",
"env_name": "development",,
}

Related

Adding "properties" to objects in a Blender scene

I am just starting my dive into Blender coming mainly from Quake's Radiant. I am trying to research whether it will fit the need I have for a level editor replacement. So with that in mind, here is my question:
What is the best method for creating and storing a set of prefab "entity" objects such as health packs, ammo pickups, and "moveable" objects such that they have a set of "properties" that can be changed within Blender?
I have found this page, but I am still getting lost as to how to integrate them on a per object basis and achieve the desired result:
https://docs.blender.org/manual/en/dev/editors/properties_editor.html
Note: It is not my goal to use the Blender game engine - just attach values to things for me to export to my own engine.
Edit1: Found an article discussing the topic although it seems very outdated:
https://www.gamasutra.com/blogs/IwanGabovitch/20120524/171032/Using_Blender_3D_as_a_3d_map_editor_rather_than_programming_your_own_from_scratch.php
Example:
// entity 105
{
"inv_item" "2"
"inv_name" "#str_02917"
"classname" "item_medkit"
"name" "item_medkit_11"
"origin" "-150 2322 72"
"triggerFirst" "1"
"triggersize" "40"
"rotation" "0.224951 0.97437 0 -0.97437 0.224951 0 0 0 1"
}
While we can manually add custom properties to any object, these are added to the specific object so can be unique to each object.
A better way of integrating new properties is to use bpy.props, these can be added to an objects class in blender, this means every object will have the same properties available.
You can setup a custom panel to edit your properties, like this simple example. Both the properties and panel as well as your object exporter can be defined in an addon which you can have enable at startup so that it is available every time you run blender. An addon also makes it easier for you to share your game editor with others.
The link I found seems to be the best option and allow for the most flexibility. The source code for the Super Tux Kart plugins serve as a great reference implementation:
https://sourceforge.net/p/supertuxkart/code/HEAD/tree/media/trunk/blender_26/

gpio-key not in sys/kernel/debug/gpio

I asked a similar question here: Embedded - GPIO Key does not register but I am tying to take a step back and focus on just one part of that question.
My board has 3 gpio-keys already built in: power, volume up, and volume down. When calling cat /sys/kernel/debug/gpio they show up under GPIOs 256-319, platform/c2f0000.gpio, tegra-gpio-aon: as expected. When in my dts file I create a new gpio-key node, no matter what is in the node, the buttons no longer show up in /sys/kernel/degub/gpio but are lsited in /proc/device-tree/gpio-keys.
If I call my node something different the buttons do not disappear, even if the new node is gpio-key compatible. I should be able to add properties to a node by inheriting from a base dtsi. Why does my additions to the gpio-key seem to disable the other keys?

Pharo: menu error

I broke something in my Pharo image, but i don't know exactly what. Now when I try to file-out my package to insert in a new image, I only see 'Why you see this menu' and 'Debug'. If I run menu debug in the playground, I get a FallbackMenu.
How can I fix this error?
EDIT: When I try to click on my package, The system browser is acting very weird an the following error pops up: link
Using Max's your code, i get 2 nil keys:
The first one is a mistake in my code (I assigned a class binding to nil instead of a instance variable with the same name). But I can't edit this because I can't access it through the System Browser.
The second one is ActiveEvent. I don't know where this comes from and whether this or the previous nil causes the System Browser to act weird
One possibility is that you nilled a class binding. Inspect the following to get a list of keys and values that are nil:
Smalltalk globals associations select: [ :assoc |
assoc value isNil or: [
assoc key isNil ] ].
BTW: rather then attaching a screen shot it would help if you attached the stack. To get the stack trace, right click on the topmost entry in the stack list (the one that's selected in your screen shot) and select "Copy to clipboard". Then paste the contents (or at least the first 30 frames) here.
Update
ActiveEvent seems normal. I have the same. The second one is very likely problematic. You may be able to cheat your way out by removing the entry:
Smalltalk globals removeKey: nil.
If done a quick try and it seems to work.

Is automated testing of Open Layers possible?

I am attempting to use selenium to test OpenLayers-2.13.1 functionality.
I am having problems with mouse clicks, mouse downs etc....
I found a couple of out-dated posts with similar problems but their resolution didn't help me.
Does anyone know of any software that can be automated to properly test Open Layers.
http://lists.osgeo.org/pipermail/openlayers-users/2012-November/026791.html
We have had some success in using Selenium WebdriverIO in running automated tests of our mapping.
The way we address map click throughs is by exposing a function from the map script from which we can get the pixel location of a feature on the map.
function pixelOfFeature (id) {
return map.getPixelFromCoordinate(...coordinate of feature...)
}
Then in our test script, once on our loaded mapping page, we query the map object for the pixel of the feature we want to click, and using webdriverio we can then move the mouse to the pixel value within the map css selector, and then perform a .buttonPress().
var client = webdriverio.remote(options)
client.moveToObject('.map', pixel[0], pixel[1]).then(function(){
client.buttonPress(0).then(callback)
})
http://webdriver.io/api/action/moveToObject.html
http://webdriver.io/api/protocol/buttonPress.html
We use ol3 however the same approach could be taken for openlayers 2
It's probably too late for the OP but hopefully this might help someone get started.

Changing interactive mode Edge Shape in JUNG

I am aware of the ability using an EdgeShapeTransformer to change the look of edges:
vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line()); // for example
However I am looking for how to change the way the line looks while dragging from one node to another to create an edge interactively. By default the 'hovering' edge which is not yet linked to another node is a large curved line. See the example here for what I mean.
CubicCurveEdgeEffects is where it is done. There is an EdgeEffects interface that can be implemented to do other things instead. It is used by the SimpleEdgeSupport class via the EditingGraphMousePlugin.
(Credit to Tom Nelson, offline communication.)