I am having an issue with Apache ServiceMix (7.0.0.M1). I start up a fresh service mix (clean) and simply install the transaction feature:
karaf#root>feature:install transaction
This puts the Aries Transaction Blueprint into a GracePeriod:
224 | GracePeriod | 80 | 1.1.1 | Apache Aries Transaction Blueprint
225 | GracePeriod | 80 | 2.1.0 | Apache Aries Transaction Blueprint
This keeps my apps I install later that require the javax transaction api from starting. Is there a workaround for this issue? I had the same issues when just using karaf 4.0.3 and trying to instal camel and transaction.
Below you'll find a listing of all bundles (the basic service mix + those added by installing the transaction feature above). Notice the failure due to the GracePeriod timeout.
karaf#root>list
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
-------------------------------------------------------------------------------------------------------
10 | Active | 50 | 5.13.0 | activemq-karaf
11 | Active | 50 | 2.6.3 | Jackson-annotations
12 | Active | 50 | 2.6.3 | Jackson-core
13 | Active | 50 | 2.6.3 | jackson-databind
23 | Active | 50 | 3.1.4 | activeio-core
24 | Active | 50 | 5.13.0 | activemq-camel
25 | Active | 50 | 5.13.0 | activemq-osgi
40 | Active | 50 | 2.16.2 | camel-blueprint
41 | Active | 50 | 2.16.2 | camel-catalog
42 | Active | 80 | 2.16.2 | camel-commands-core
43 | Active | 50 | 2.16.2 | camel-core
44 | Active | 50 | 2.16.2 | camel-cxf
45 | Active | 50 | 2.16.2 | camel-cxf-transport
46 | Active | 50 | 2.16.2 | camel-jms
47 | Active | 50 | 2.16.2 | camel-spring
48 | Active | 50 | 2.16.2 | camel-xstream
49 | Active | 80 | 2.16.2 | camel-karaf-commands
51 | Active | 50 | 3.2.2 | Apache Commons Collections
53 | Active | 50 | 3.3.0 | Commons Net
54 | Active | 50 | 1.6.0 | Commons Pool
55 | Active | 50 | 2.4.2 | Apache Commons Pool
93 | Active | 50 | 2.0.0 | geronimo-j2ee-connector_1.5_spec
94 | Active | 50 | 1.0.1 | geronimo-j2ee-management_1.1_spec
99 | Active | 50 | 3.4.6 | ZooKeeper Bundle
129 | Active | 80 | 2.0.9 | Apache MINA Core
132 | Active | 50 | 7.0.0.M1 | Apache ServiceMix :: ActiveMQ :: Camel
133 | Active | 50 | 7.0.0.M1 | Apache ServiceMix :: ActiveMQ :: Service
136 | Active | 50 | 1.6.1.5 | Apache ServiceMix :: Bundles :: dom4j
138 | Active | 50 | 1.9.2.1 | Apache ServiceMix :: Bundles :: jasypt
142 | Active | 50 | 1.1.0.4 | Apache ServiceMix :: Bundles :: jdom
143 | Active | 50 | 2.3.0.2 | Apache ServiceMix :: Bundles :: kxml2
156 | Active | 50 | 1.7.0.6 | Apache ServiceMix :: Bundles :: velocity
160 | Active | 50 | 1.1.4.c | Apache ServiceMix :: Bundles :: xpp3
161 | Active | 50 | 1.4.8.1 | Apache ServiceMix :: Bundles :: xstream
172 | Active | 50 | 3.18.0 | Apache XBean :: Spring
201 | Active | 50 | 0.6.4 | JAXB2 Basics - Runtime
214 | Active | 50 | 2.11.0.v20140415-163722-cac6383e66 | Scala Standard Library
221 | Active | 80 | 1.2.0 | CDI APIs
222 | Active | 80 | 1.2 | javax.interceptor API
223 | Active | 80 | 1.2 | javax.transaction API
224 | Failure | 80 | 1.1.1 | Apache Aries Transaction Blueprint
225 | Failure | 80 | 2.1.0 | Apache Aries Transaction Blueprint
226 | Active | 80 | 1.3.0 | Apache Aries Transaction Manager
227 | Active | 80 | 1.0.2 | Apache Felix Coordinator Service
228 | Active | 80 | 1.0.0.2 | Apache ServiceMix :: Bundles :: javax.inject
I have cross posted to the apache mailing lists as well.
The problem is that the spring-tx feature installs the jta 1.1 spec bundle. The aries transaction bundles require the new jta 1.2 spec though. So they do not find the TransactionManager which is bound to the wrong spec version.
This is caused by an error in the karaf spring-tx feature. The feature should depend on the jta 1.1 spec with dependency=true. This allows the karaf resolver to choose a different bundle providing suitable capabilities.
I have documented this issue in KARAF-4358. The issues is solved on master and the 4.0.x branch. So it will be delivered in karaf 4.0.5. You can fix you karaf distro by editing the feature file in the system dir in the same way I did.
Related
I´m currently using a tool, which creates a little informational report over solidity smart contracts with some usefull informations in it, that I want to partially display on the website I´m working on.
The tool is called solidity-metrics (https://github.com/ConsenSys/solidity-metrics) and can be used as CLI or as a library in your backend for example, which is what I want to use.
I´m sending files to my backend, which than scans those solidity files with the metrics tool.
It creates can create an object with a lot of meta-data using metrics.total() but it also can create a markdown string using metrics.generateReportMarkdown().
It includes taledata, which is only displayed in the markdown, not in the metrics.total() object, so I need to somehow turn it into html.
The table content from the markdown looks like this:
| Type | File | Logic Contracts | Interfaces | Lines | nLines | nSLOC | Comment Lines | Complex. Score | Capabilities |
|========|=================|============|=======|=======|===============|==============|
| 📝 | ./uploads/contracts/ProjectName.sol | 1 | **** | 564 | 535 | 308 | 152 | 221 | **<abbr title='Uses Assembly'>🖥</abbr><abbr title='Payable Functions'>💰</abbr><abbr title='Uses Hash-Functions'>🧮</abbr><abbr title='create/create2'>🌀</abbr>** |
| 📝 | ./uploads/contracts/ERC2981.sol | 1 | **** | 48 | 37 | 24 | 7 | 15 | **** |
| 🔍 | ./uploads/contracts/IERC2981.sol | **** | 1 | 18 | 14 | 3 | 10 | 3 | **** |
| 📝 | ./uploads/contracts/MockERC721.sol | 1 | **** | 27 | 27 | 19 | 1 | 18 | **** |
| 📝 | ./uploads/contracts/TokenName.sol | 1 | **** | 285 | 262 | 157 | 46 | 159 | **<abbr title='Uses Assembly'>🖥</abbr><abbr title='Uses Hash-Functions'>🧮</abbr>** |
| 📝 | ./uploads/contracts/Originals.sol | 1 | **** | 142 | 128 | 83 | 22 | 81 | **<abbr title='Uses Hash-Functions'>🧮</abbr>** |
| 📝 | ./uploads/contracts/SutterTreasury.sol | 1 | **** | 23 | 23 | 17 | 1 | 20 | **<abbr title='Payable Functions'>💰</abbr>** |
| 📝🔍 | **Totals** | **6** | **1** | **1107** | **1026** | **611** | **239** | **517** | **<abbr title='Uses Assembly'>🖥</abbr><abbr title='Payable Functions'>💰</abbr><abbr title='Uses Hash-Functions'>🧮</abbr><abbr title='create/create2'>🌀</abbr>** |
What I´ve tried and found out so far:
So the table actually kinda looks like normal markdown to me, but somehow, when trying to throw it inside a .md files it still doesn´t look like it should:
I figured out, that they have linked this github.css file in their credits:
https://gist.github.com/tuzz/3331384
tryed to import it into the .md file but it also didn´t seem to work, don´t even know if that makes sense to import a css file into a .md file...
To come to an end, does anyone have an idea on how to turn this markdown into html, which looks like the image I posted above (which I created with the function, which you can build into vs code, where you can mark the files, right click and scan them using metrics)?
Edit: So I figured out, that the equal signs, splitting the headers from the table body could be replaced by hyphens, which would work out fine in the markdown. I could solve that by replacing all "=" with "-", but that would destroy the rest of the markdown file, because there are also other usecases for the equal sign.
I'm trying to install a different version of java amzn on macOS Apple Silicon M1 but it's no other candidate available than the listed ones:
Would it be possible to get extra candidates?
tl;dr
Ask your vendor of choice to publish their product via SDKMAN using simple REST API or Gradle/Maven plugin.
To refresh the list of products, run the update command.
sdk update
You asked:
install a different version of java amzn on macOS Apple Silicon
I see Amazon offering four releases of Corretto for Macs with Apple Silicon:
18
18.0.1
17.0.3.6.1
17.0.2.8.1
Details
As I understand it, the way SDKMAN works is that a vendor chooses to publish their releases via that avenue. If you want a product from a vendor not currently listed, ask that vendor to make their product available via SDKMAN.
To quote the SDKMAN web site:
SDKMAN! is unique in that it empowers SDK Vendors to publish their candidate releases on our platform. We provide a secure API that can be used to manage all aspects of a release on SDKMAN!. Such aspects include Releasing a new version, setting an existing version as Default (Stable) and Announcing the release on the SDKMAN! CLI broadcast and Twitter feed.
The process seems quite simple. See the Vendors page of the SDKMAN web site.
SDKMAN makes available a JSON REST API by which a vendor supplies their release information.
If the vendor prefers not to mess with cURL or HttpClient, they may alternatively choose to use the plugins for Gradle or Maven as the way to publish their new build.
As of 2022-04, the list of product offerings on SDKMAN for the Java platform on Macs with Apple Silicon has grown in just these last two months. When I run sdk list java, I get eight vendors offering various products that include:
Current version 18.0.1
All three LTS versions (8, 11, 17)
Early-access version of Java 19.
================================================================================
Available Java Versions for macOS ARM 64bit
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
Corretto | | 18 | amzn | | 18-amzn
| >>> | 18.0.1 | amzn | installed | 18.0.1-amzn
| | 17.0.3.6.1 | amzn | | 17.0.3.6.1-amzn
| | 17.0.2.8.1 | amzn | | 17.0.2.8.1-amzn
Java.net | | 19.ea.19 | open | | 19.ea.19-open
| | 19.ea.18 | open | | 19.ea.18-open
| | 19.ea.5.lm | open | | 19.ea.5.lm-open
| | 18 | open | | 18-open
| | 18.0.1 | open | | 18.0.1-open
| | 17.0.2 | open | | 17.0.2-open
Liberica | | 18.fx | librca | | 18.fx-librca
| | 18.0.1.fx | librca | | 18.0.1.fx-librca
| | 18.0.1 | librca | | 18.0.1-librca
| | 18 | librca | | 18-librca
| | 17.0.3.fx | librca | | 17.0.3.fx-librca
| | 17.0.3 | librca | | 17.0.3-librca
| | 17.0.2.fx | librca | | 17.0.2.fx-librca
| | 17.0.2 | librca | | 17.0.2-librca
| | 11.0.15 | librca | | 11.0.15-librca
| | 11.0.14 | librca | | 11.0.14-librca
| | 8.0.332 | librca | | 8.0.332-librca
| | 8.0.322 | librca | | 8.0.322-librca
Microsoft | | 17.0.2 | ms | | 17.0.2-ms
| | 11.0.14 | ms | | 11.0.14-ms
Oracle | | 18.0.1 | oracle | | 18.0.1-oracle
| | 18 | oracle | | 18-oracle
| | 17.0.3 | oracle | | 17.0.3-oracle
| | 17.0.2 | oracle | | 17.0.2-oracle
SapMachine | | 18 | sapmchn | | 18-sapmchn
| | 18.0.1 | sapmchn | | 18.0.1-sapmchn
| | 17.0.2 | sapmchn | | 17.0.2-sapmchn
Temurin | | 18 | tem | | 18-tem
| | 17.0.2 | tem | | 17.0.2-tem
Zulu | | 18 | zulu | | 18-zulu
| | 18.fx | zulu | | 18.fx-zulu
| | 17.0.3 | zulu | | 17.0.3-zulu
| | 17.0.2 | zulu | | 17.0.2-zulu
| | 17.0.2.fx | zulu | | 17.0.2.fx-zulu
| | 11.0.15 | zulu | | 11.0.15-zulu
| | 11.0.14 | zulu | | 11.0.14-zulu
| | 8.0.332 | zulu | | 8.0.332-zulu
| | 8.0.322 | zulu | | 8.0.322-zulu
================================================================================
I am looking for the CPU, Memory and Disk consumption for each Tenant in Openstack,and their relationship by users, instances, flavors in use. Horizon only shows utilization of memory, cpu of a global way. Is it possible to get it with Openstack commands?
My openstack is based on Rocky.
Any ideas will be really appreciated
The only thing I know is
openstack limits show --absolute --project <Project_ID/Tenant_ID>
see also https://docs.openstack.org/python-openstackclient/pike/cli/command-objects/limits.html
In the output you have information like for example totalCoresUsed, which represents the number of cores, which are used by the selected project.
Example:
root#openstack-controller:~# openstack limits show --absolute --project 416f937f505f4ff6b623c48a61228a86
+--------------------------+-------+
| Name | Value |
+--------------------------+-------+
| maxTotalInstances | 10 |
| maxTotalCores | 20 |
| maxTotalRAMSize | 51200 |
| maxSecurityGroups | 10 |
| maxTotalFloatingIps | 10 |
| maxServerMeta | 128 |
| maxImageMeta | 128 |
| maxPersonality | 5 |
| maxPersonalitySize | 10240 |
| maxSecurityGroupRules | 20 |
| maxTotalKeypairs | 100 |
| maxServerGroups | 10 |
| maxServerGroupMembers | 10 |
| totalRAMUsed | 2560 |
| totalCoresUsed | 7 |
| totalInstancesUsed | 7 |
| totalFloatingIpsUsed | 0 |
| totalSecurityGroupsUsed | 1 |
| totalServerGroupsUsed | 0 |
| maxTotalVolumes | 10 |
| maxTotalSnapshots | 10 |
| maxTotalVolumeGigabytes | 1000 |
| maxTotalBackups | 10 |
| maxTotalBackupGigabytes | 1000 |
| totalVolumesUsed | 5 |
| totalGigabytesUsed | 7 |
| totalSnapshotsUsed | 0 |
| totalBackupsUsed | 0 |
| totalBackupGigabytesUsed | 0 |
+--------------------------+-------+
The quotas and so the limitations are bind to projects and not to users, so I don't know if it is possible to get a relationshit by users. The only idea I would have, would a simple bash-script, which iterates over all instances and volumes of a project and collect the information of each ressource by the user, who created it.
Update 30.7.2020:
Found a better solution now, which also allows to get the resource usage per user of a project. It comes with the new placement-component with the stein-release of openstack (tested in train-release of openstack).
Installation of the openstack-client extension: pip install osc-placement
Ressource-usage of a project:
openstack resource usage show --os-placement-api-version 1.9 <PROJECT_ID>
Ressource-usage of a specific user within a project:
openstack resource usage show --os-placement-api-version 1.9 --user-id <USER_ID> <PROJECT_ID>
Example:
openstack resource usage show --os-placement-api-version 1.9 --user-id 98378bd3cdd94218bf7b6ef4ec80e74a 7733616a513444c2a106243db318b0dd
+----------------+-------+
| resource_class | usage |
+----------------+-------+
| VCPU | 3 |
| MEMORY_MB | 768 |
| DISK_GB | 9 |
+----------------+-------+
The Project -> NETWORK -> Network Topology always loading...
But the Project -> NETWORK -> Networks and Project -> NETWORK -> Routers all are good, will shows the information.
Finally I found nova-compute service did not start up:
[root#ha-node3 mysql]# nova service-list
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 2 | nova-consoleauth | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 5 | nova-conductor | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 7 | nova-cert | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 15 | nova-scheduler | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 22 | nova-cert | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 29 | nova-conductor | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 32 | nova-consoleauth | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 33 | nova-consoleauth | ha-node2 | internal | enabled | up | 2017-08-06T11:43:38.000000 | - |
| 36 | nova-scheduler | ha-node1 | internal | enabled | up | 2017-08-06T11:43:41.000000 | - |
| 40 | nova-conductor | ha-node2 | internal | enabled | up | 2017-08-06T11:43:39.000000 | - |
| 44 | nova-cert | ha-node2 | internal | enabled | up | 2017-08-06T11:43:39.000000 | - |
| 46 | nova-scheduler | ha-node2 | internal | enabled | up | 2017-08-06T11:43:48.000000 | - |
| 49 | nova-compute | ha-node2 | nova | enabled | down | 2017-08-06T08:57:50.000000 | - |
| 53 | nova-compute | ha-node1 | nova | enabled | down | 2017-08-06T08:57:30.000000 | - |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
So I restarted the nova-compute service:
systemctl start openstack-nova-compute.service
Normally, I can do show partitions <table> in hive. But when it is a parquet table, hive does not understand it. I can go to hdfs and check the dir structure, but that is not ideal. Is there any better way to do that?
I am using Impala 1.4.0 and I can see partitions.
From the impala-shell give the command:
show partitions <mytablename>
I have something looking like this:
+-------+-------+-----+-------+--------+---------+--------------+---------+
| year | month | day | #Rows | #Files | Size | Bytes Cached | Format |
+-------+-------+-----+-------+--------+---------+--------------+---------+
| 2013 | 11 | 1 | -1 | 3 | 25.87MB | NOT CACHED | PARQUET |
| 2013 | 11 | 2 | -1 | 3 | 24.84MB | NOT CACHED | PARQUET |
| 2013 | 11 | 3 | -1 | 2 | 19.05MB | NOT CACHED | PARQUET |
| 2013 | 11 | 4 | -1 | 3 | 23.63MB | NOT CACHED | PARQUET |
| 2013 | 11 | 5 | -1 | 3 | 26.56MB | NOT CACHED | PARQUET |
Alternatively you can go to your table in HDFS . They are normally seen in this path:
/user/hivestore/warehouse/<mytablename> or
/user/hive/warehouse/<mytablename>
Unfortunately no. Issue is open though. So checking it manually seems to be the only option right now.