How to set universe name and name spaces in yugabyte-db? - yugabytedb

I searched to set universe name and name spaces in yugabyte-db.
but, couldn't manage.
Please guide me in setting universe name and name spaces in yugabyte-db.

You can start your YB master like this:
./bin/yb-master --flagfile /db/master.conf >& /db/yb-master.out &
and put the following data into your /db/master.conf:
--placement_zone=your-zone
--placement_region=your-region
--placement_cloud=your-cloud
The corresponding reference is located here: https://docs.yugabyte.com/latest/reference/configuration/yb-tserver/#geo-distribution-options
Cheers

Related

Substring of a file name in ADF

in Azure Data factory ,i am getting "Common_EUR_AP_COMPCODE_YYY_MM_DD" as file name from "Get Metadata" activity which is then going thru "foreach loop" , now i want to take just "COMPCODE" bit of it inside foreach > "set variable" and ignore the rest. Can somebody please help on how to do it.
i used many ways but the v close one was "#substring(item().name,add(indexof(item().name,''),3),add(lastindexof(item().name,''),1))"
Please try this expression:
#split(item().name,'_')[3]
Result:
Reference:
https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#split

Access Query Expression: Extract word between two other words

Hi there: I've checked several solutions now and I'm close but not quite there. However, I'm also trying to determine if what I'm doing makes sense. I just keep feeling like there's a better option.
Business problem: I need to extract the Region Name, which is between the word "DID " and " Region". I've been able to do either one to get everything before and the Region Name and the word "Region", but I want just the Region Name. Please see below and advise - very much appreciated!
Example: DID North Region. I only want "North".
Region: IIf(Right([Tier 6],6)="Region",Mid([Tier 6],InStrRev([Tier 6],"DID ")+4),"")
This expression gives me [Region Name] Region. I want the word "Region" removed as well.
Thank you!
Since you are using IIf conditional, I presume "Region" is not always present. Also presume if there is no "Region" then there is no "DID". In case there is possibility field will be null, consider:
Region: IIf(InStr(Nz([Tier 6],""),"Region")>0,Mid(Left([Tier 6],InStrRev([Tier 6]," ")-1),5),[Tier 6])

Sorting Files by Name Containing Decimals

I have 200 files in my folder that I would like to sort by name. Here is a short list of my files according to the way that my Linux computer sorted them by default.
Name at 0.2142.png
Name at 0.4284.png
Name at 0.04284.png
Name at 0.6426.png
Name at 0.8568.png
Name at 0.08568.png
...
I would like to resort them by name from lowest to highest, so my list would become
Name at 0.04284.png
Name at 0.08568.png
...
Name at 0.2142.png
Name at 0.4284.png
Name at 0.8568.png
...
(I put elipses in the middle of my list because there are many more files between Name at 0.08568.png and Name at 0.2142.png.)
I'm still new to writing bash files but I would think I could write one to sort my figures.
Thanks
Addendum:
Since the file names are so long I abbreviated them as Name at...
The real file name is Planetary Vorticity Tilting by Radial Velocity at t = with a number at the end. I hope you can understand why I didn't put that in the original question. I'm also pretty sure I said in the comments below that I am new to Linux and Ubuntu, I do not know "how" the file listing is created. I have a MatLab code that makes png files based off of my CFD data with the name that I provided above and the appropriate time step. When I open the folder on the Linux computer the files are automatically sorted in the way I listed above and I have no idea why.
If there is any other clarification needed I would be happy to put it here.
Given:
$ echo "$files"
Name at 0.2142.png
Name at 0.4284.png
Name at 0.04284.png
Name at 0.6426.png
Name at 0.8568.png
Name at 0.08568.png
Name at 1.11.png
You can do:
$ echo "$files" | sort -t. -k1
Name at 0.04284.png
Name at 0.08568.png
Name at 0.2142.png
Name at 0.4284.png
Name at 0.6426.png
Name at 0.8568.png
Name at 1.11.png
That assumes the prefix Name at is the same in all cases.

How does Mesos-DNS name tasks with slash ("nested")?

For example:
If Marathon is running a task named /cassandra, Mesos-DNS assigns it a DNS name - cassandra.marathon.mesos.
Now I have a task named /monit/promdash. How can I find its DNS name?
Already tried:
monit_promdash.marathon.mesos, promdash_monit.marathon.mesos (and with - instead of _), monit.marathon.mesos, promdash.marathon.mesos, ...)
There's a HTTP interface. Couldn't find how to list all DNS names either...
Thanks,
Marathon reverses the hierarchical names, concatenates them with - and this is the app name then, so in your case it would be promdash-monit.marathon.mesos. Try it out.
At the bottom of the Mesos-DNS naming documentation we provide some more details about how these FQHN are constructed and you can also check out a complete end-to-end example I've put together, using two levels of hierarchies.

how to set default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton?

how to give default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton? How the arguments should be passed? I tried like following code.
CMFCEditBrowseCtrl py_file_path;
py_file_path.EnableFileBrowseButton(_T"PY",_T"*.py");
But it is not displaying the .py files. It says "no items matches". I guess there is some problem with the lpszDefExt and lpszFilter values i use. Could anyone tell me what is the value of those arguments to list all .py files?
You need to set it like this:
CMFCEditBrowseCtrl py_file_path;
py_file_path.EnableFileBrowseButton(_T("PY"), _T("Python files|*.py||"));
The final argument is a filter string, where the description and filter are delimited by |.

Resources