草庐IT

delegating-constructor

全部标签

hadoop - 除了 hadoop 集群中设置的时间之外,如何为长时间运行的应用程序更新委托(delegate) token

我有一个在我的Hadoop环境中运行的ApacheApex应用程序。我对应用程序没有任何问题,只是它在7天后失败了。而且,我意识到这是因为任何应用程序的集群级别设置。有什么办法,我可以每隔一段时间定期更新委托(delegate)token,以确保作业连续运行而不会失败!!我可以在网上找到任何关于如何更新hdfs委托(delegate)token的资源!!有人可以分享您的知识吗? 最佳答案 Apexdocumentation中提到了这个问题.它还详细提供了2个解决方案。Hadoop系统的非侵入式将选择“自动刷新方法”。基本上你需要将你

hadoop - 错误 : the constructor htable (configuration string) is deprecated

我正在使用CDH5.4.2并尝试创建Hbase表,代码片段如下:Configurationconf=HBaseConfiguration.create(newConfiguration());HBaseAdminhba=newHBaseAdmin(conf);if(!hba.tableExists(args[0])){HTableDescriptorht=newHTableDescriptor(args[0]);ht.addFamily(newHColumnDescriptor("sample"));存在已弃用错误。如何避免这些警告?我需要添加任何特定的jar吗?CDH5.4.2?

hadoop - 即使在向命令行添加原则后,HDFS 委托(delegate) token 也已过期

我在hadoop中运行一个sparkstreaming作业。该机器已进行kerberos化,它运行良好42小时,但由于HDFStoken委托(delegate)到期而失败。我什至为每8小时运行一次的kinit命令设置了crontab,并且我拥有10小时的Max-renew生命周期token。Failedduetoerror:org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.token.SecretManager$InvalidToken):token(HDFS_DELEGATION_TOKENtoken我还

hadoop - 在缓存中找不到 Hdfs 委托(delegate) token - Spark 应用程序出错

我在Spark版本2.3.0中有一个简单的SparkStreaming应用程序,它将每个处理批处理的结果放在HDFS上。我的应用程序在部署模式客户端的YARN上运行,我正在使用kerberizedhadoop集群(hadoop2.6.0-cdh5.9.3)。我在spark-submit命令中设置了--principal和--keytab。几天后,由于缓存中缺少委托(delegate)token,我的应用程序无法写入HDFS。重新启动应用程序后,流媒体工作正常,但几天后由于同样的原因再次失败。这是来自驱动程序的日志:ERRORJobScheduler:Errorrunningjobstr

php - 开始 oop php 问题 : do constructors take the place of getter?

我正在完成本教程:http://www.killerphp.com/tutorials/object-oriented-php/php-objects-page-3.php首先他让你在类中创建一个setter和getter方法:name=$new_name;}functionget_name(){return$this->name;}}php?>然后创建对象并回显结果:set_name("StefanMischook");$jimmy->set_name("NickWaddles");echo"ThefirstObjectnameis:".$stefan->get_name();ech

php - Laravel 5,委托(delegate) - 检查角色不起作用

我是Laravel的新手。我正在尝试在Laravel5Zizaco/entrust(来自laravel-5分支)中使用。一切正常-附加规则,分离规则......但是当我尝试检查权限时我遇到了问题。首先我在routes.php中尝试,但是在这个地方Entrust不知道我是谁,hasRole和routeNeedsRole在routes.php中不工作。在中间件中,hasRole有效,但routeNeedsRole无效。尝试用作第二个参数字符串、数组,效果相同-abort(403)运行。因为hasRole正在工作,这个问题对我来说看起来很奇怪。composerdump-autoload-已使

PHP 类 : assigning static property via constructor

类的简化示例:classTableextendsTableAbstract{protectedstatic$tablename;function__construct($str){$this->tablename="table_".$str;$this->insert();//abstractfunction}}当我过去使用这样的类时,我在编写类时直接分配了$tablename。但是这次我希望它由构造函数决定。但是当我调用引用$tablename的函数时,当我回显SQL时,变量似乎是空的。我做错了什么,或者有人可以建议一种方法来实现我在这里想要的吗?感谢您的任何评论/回答..

php - Zend 表单 : How to pass parameters into the constructor?

我正在尝试测试我的表格。它将构建其他对象,因此我需要一种方法来模拟它们。我尝试将它们传递给构造函数...classForm_EventextendsZend_Form{publicfunction__construct($options=null,$regionMapper=null){$this->_regionMapper=$regionMapper;parent::__construct($options);}...但我得到一个异常(exception):Zend_Form_Exception:Onlyformelementsandgroupsmaybeoverloaded;va

PHP 特征 : How to circumvenient constructors or force them to be called?

看看下面的特征:traitPrimaryModelRest{useRestController;protected$primaryModel;publicfunction__construct(){$mc=$this->getPrimaryModelClass();try{$this->primaryModel=new$mc();if(!($this->primaryModelinstanceofModel)){thrownewClassNotFoundException("PrimaryModelfatalexception:ThegivenClassisnotaninstanceo

php - 在 PHP 中执行委托(delegate)或回调的正确方法

我需要在php中实现以下模式:classEventSubscriber{private$userCode;publicfunction__construct(&$userCode){$this->userCode=&$userCode;}publicfunctionSubscribe($eventHandler){$userCode[]=$eventHandler;}}classEvent{private$subscriber;private$userCode=array();publicfunction__construct(){$this->subscriber=newSubscr