Support Questions
Find answers, ask questions, and share your expertise

CM update Sqoop Service Environment Safety Valve i


Problem desc:

I need to update the 2 properties in sqoop, but I am not able do it through sqoop.propeties files as CM will overide it, Its need to be done in the  Sqoop Service Environment Safety Valve in CM,



But when I did it in the sqoop2 service, in the advanced  configuration,to setup key/value pair for  "Sqoop Service Environment Safety Valve", below is the format.





I get the below error,

Could not parse: Sqoop Service Environment Safety Valve : Could not parse parameter 'sqoop_env_safety_valve'. Was expecting: valid variable name. Input: connector.autoupgrade=true


If i just give it like this it works



but I need the whole string. I need help, what is format?





Accepted Solutions

Re: CM update Sqoop Service Environment Safety Valve i

There are multiple safety valves for sqoop, and you are editing the wrong one. See my first reply.

You need to edit the one that will alter, NOT the one that will alter the environment. Read the name and description carefully.

View solution in original post


Re: CM update Sqoop Service Environment Safety Valve i



Why do you want to enable auto upgrade? Sqoop has upgrade commands that will do this for you. Auto upgrade may have other side effects that could cause problems down the line.


If you really want to make this change, you need to modify the safety valve for, not the environment safety valve.




Re: CM update Sqoop Service Environment Safety Valve i


Thanks dlo for reply,

I started doing this because when I start the sqoop service in CM, I get the below error. So some one on the forum suggested that turning to true will help that, 


Connector config urls: [jar:file:/hdp2014poc/cloudera/parcels/CDH-4.6.0-1.cdh4.6.0.p0.26/lib/sqoop2/webapps/sqoop/WEB-INF/lib/sqoop-connector-generic-jdbc-1.99.2-cdh4.6.0.jar!/]
Connector [org.apache.sqoop.connector.jdbc.GenericJdbcConnector] initialized.
Marking transaction for rollback
Attempting transaction roll-back
Server startup failure
org.apache.sqoop.common.SqoopException: CONN_0007:Connector registration failed
at org.apache.sqoop.connector.ConnectorManager.registerConnectors(
at org.apache.sqoop.connector.ConnectorManager.initialize(
at org.apache.sqoop.core.SqoopServer.initialize(
at org.apache.sqoop.server.ServerInitializer.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.startup.HostConfig.deployWAR(
at org.apache.catalina.startup.HostConfig.deployWARs(
at org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Caused by: org.apache.sqoop.common.SqoopException: JDBCREPO_0026:Upgrade required but not allowed - Connector: generic-jdbc-connector
at org.apache.sqoop.repository.JdbcRepository$3.doIt(
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(
at org.apache.sqoop.repository.JdbcRepository.registerConnector(
at org.apache.sqoop.connector.ConnectorManager.registerConnectors(
... 27 more
Shutting down Sqoop server

Re: CM update Sqoop Service Environment Safety Valve i

When you get that message, it generally means you should run the upgrade command. CM has made this one easy for you, so no need to figure out how to do the upgrade manually.

Re: CM update Sqoop Service Environment Safety Valve i


Thanks again,

but how do I run this upgrade command in CM.

Any tips would be helpful.

Re: CM update Sqoop Service Environment Safety Valve i

Click on Sqoop, then in the Actions dropdown menu on the right, you'll see an option to Upgrade Sqoop. If it's greyed out, that's because you need to stop Sqoop first.




Re: CM update Sqoop Service Environment Safety Valve i


I am using CDH 4.6, 

I don't see the upgrade in action

these all the choices I have start, stop,restart,rename,enter maintenance mode, create group.


Let me know If I am missing something.


Re: CM update Sqoop Service Environment Safety Valve i

It looks like the sqoop upgrade action is only available in CM for CDH 5 clusters. Sorry for the confusion.

I'm not sure what triggered the need for a sqoop upgrade, but it seems like you'll need to use safety valves to configure to perform this upgrade manually.

I'd be curious to know what you might have done to trigger a sqoop upgrade in CDH 4. CM currently assumes that's impossible.

Re: CM update Sqoop Service Environment Safety Valve i


After the CM upgrade from 4.5 to 4.6, I get these errors, I am not able to start the sqoop2 service. So on the forum it is said to manually edit the files.


I did the following

conf -> /etc/alternatives/sqoop2-conf
/etc/alternatives/sqoop2-conf -> /hdp2014poc/cloudera/parcel-repo/CDH-4.5.0-1.cdh4.5.0.p0.30/etc/sqoop2/conf.dist




even after updating the, I still get the above error.

Re: CM update Sqoop Service Environment Safety Valve i

CM-managed sqoop2 doesn't read from that file. Edit the safety valve for instead.