linux监控tomcat状态的脚本文件,并且30秒发送邮件

monitorTomcat.sh #!/bin/sh #Tomcat启动程序(根据自己路径编写) StartTomcat=/usr/tomcat/apache-tomcat-7.0.90/bin/startup.sh TomcatCache=/usr/tomcat/apache-tomcat-7.0.90/work #定义要监控的页面地址(写比较简单页面即可) ...
分类: 其他 发布时间: 08-19 22:43 阅读次数: 0

Redis教程(一)Windows下安装

一.先说说数据库的分类 1.关系型数据库:Oracle,MySQl,SQLServer    特点:数据必须满足特定的要求,需要预先定义表关系以及数据的类型和长度,操作复杂 2.键值对型数据库:Redis,DynamoDB,memcached     特点:以键值对(key-value)的形式存储,不适合业务复杂的项目,高性能读取 3.列式数据库:HBase,cassandra    ...
分类: 数据库 发布时间: 08-19 22:43 阅读次数: 0

JDBC原生写法+原生连接池

在网上找了许多文章,关于JDBC连接的杂七杂八,要么写的很复杂,所以自己总结了一下。   1.项目结构图 2.新建一个properites文件     用于jdbc加载数据库信息 driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/jdbctest username=root password=root jdbc...
分类: 数据库 发布时间: 08-19 22:43 阅读次数: 0

Hadoop总结篇

1 概述 学了那么久的hadoop,到底什么是hadoop呢? 先来说说我的理解,从广义上说他可以代表hadoop整个生态圈例如,hive,spark,hbase,zookeeper等等一系列框架。 从狭义上说他是一个,他是分布式的,可扩展的,高可用的计算框架,由hdfs,mapreduce,yarn组成(hadoop1.x只有hdfs,mapreduce)。 该篇博客只进行整体思路的介绍...
分类: 其他 发布时间: 08-19 22:42 阅读次数: 0

flume对接kafka产生的错误org.apache.flume.conf.ConfigurationException: brokerList must contain at least one

环境 flume-1.6.0-cdh5.7.0-bin kafka_2.11-0.10.0.1 错误 圈出来的日志信息明显提示我们因为配置文件的错误导致我们sink挂了,所以产生下面的错误,org.apache.flume.conf.ConfigurationException: brokerList must contain at least one Kafka broker ...
分类: 其他 发布时间: 08-19 22:41 阅读次数: 0

java中从内存区域和类加载机制理解类变量、成员变量和局部变量加载过程

1 定义 1.1 类变量 归属类的变量,它是通过在定义类的属性的时,增加static修饰符,所以又称为静态变量。类变量不仅可以直接通过类名.变量名来访问,也可以通过类对象.变量来访问. 1.2成员变量 归属于类的实例的变量,没有经过static修饰,成员变量存在于类之内,方法和代码块之外。实例变量只能通过类对象.变量访问。 1.3局部变量 是在类中方法体里面所定义的变量,不管...
分类: 其他 发布时间: 08-19 22:41 阅读次数: 0

两阶段聚合(局部聚合+全局聚合)解决groupby产生数据倾斜的简单案例

1概述 有的时候,我们可能会遇到大数据计算中一个最棘手的问题——数据倾斜,此时Spark作业的性能会比期望差很多。数据倾斜调优,就是使用各种技术方案解决不同类型的数据倾斜问题,以保证Spark作业的性能。该篇博客参考美团的spark高级版,只是修改了代码使用了scala写的。 2产生原因 方案适用场景:对RDD执行reduceByKey等聚合类shuffle算子或者在Spark SQL中使用...
分类: 其他 发布时间: 08-19 22:41 阅读次数: 0

树的高度,深度,层数

申明:本文高度,深度基数为1,但是在《数据结构与算法分析:java语言描述》这本书上,高度,深度的基数为0;两种记法都没有错,都可以用来描述树的性质,只需要标注(>0)或者(>=0)做一个区分和解释即可 节点n的高度 n节点到叶子节点所有路径上包含节点个数的最大值。叶子节点的高度为1,往上节点的高度依次递增。 节点n的深度 从根节点到节点n唯一的路径的长,根节点深度为1...
分类: 其他 发布时间: 08-19 22:41 阅读次数: 0

Spring boot 入门以及搭建简单的Hello World

1 简介 Spring Boot是目前很红火的开发工具了,它是用来简化Spring应用开发,约定大于配置,去繁从简,能够创建一个独立的、产品级别的应用。 2 产生背景 说到Spring Boot不得不说到微服务,微服务其实是一种架构风格,他是一组小型服务,这些小型服务通过http的形式进行访问,每一个小型服务相当于各个功能,相当于把一个项目拆分为一个一个的模块进行独立开发。 微服务文档 ...
分类: 其他 发布时间: 08-19 22:40 阅读次数: 0

使用Broadcast变量与map类算子实现join操作,进而完全规避掉shuffle类的操作

概述 有的时候,我们可能会遇到大数据计算中一个最棘手的问题——数据倾斜,此时Spark作业的性能会比期望差很多。数据倾斜调优,就是使用各种技术方案解决不同类型的数据倾斜问题,以保证Spark作业的性能。该篇博客参考美团的spark高级版,使用scala代码进行简单的模拟。 方案适用场景 在对RDD使用join类操作,或者是在Spark SQL中使用join语句时,而且join操作中的一个...
分类: 其他 发布时间: 08-19 22:40 阅读次数: 0

The file will have its original line endings in your working directory.

错误描述 在使用git提交的时候出现The file will have its original line endings in your working directory.错误,后来发现 自己再提交的时候忘记输入git add 上传的文件 出现了上面的错误,需要下面进行修改: 1 git rm -r -f --cached ./ (删除缓存) 2 git add . (添加该目录下...
分类: 其他 发布时间: 08-19 22:40 阅读次数: 0

MyBtais错误:Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias

Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: ...
分类: 其他 发布时间: 08-19 22:39 阅读次数: 0

map的几种遍历方式和其他操作

/* map遍历方式1 */ public static void iterator1(){ Iterator<Map.Entry<String,String >> iterator =map.entrySet().iterator(); while (iterator.hasNext()){ ...
分类: 其他 发布时间: 08-19 22:39 阅读次数: 0

Mybatis使用中遇到的错误

Mybatis报错 错误1 ### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.ArrayList and java.lang.String ### Cause: java.lang.IllegalArgumentException: i...
分类: 其他 发布时间: 08-19 22:39 阅读次数: 0

Spring Boot项目搭建访问时404

错误 @RestController @RequestMapping(value = "/LLGA") public class TestController { @RequestMapping(value = "/test" ,method = RequestMethod.GET) public String test1(@RequestParam(value = "JobN...
分类: 其他 发布时间: 08-19 22:39 阅读次数: 0

LeetCode专题:242. Valid Anagram

242. Valid Anagram 题目 Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 2: Input: s = "rat", t ...
分类: 其他 发布时间: 08-19 22:38 阅读次数: 0

LeetCode专题:268. Missing Number

Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1] Output: 2 Example 2: Input: [9,6,4,2,3,5...
分类: 其他 发布时间: 08-19 22:38 阅读次数: 0

LeetCode专题:136.Single Number

Single Number Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implemen...
分类: 其他 发布时间: 08-19 22:38 阅读次数: 0

LeetCode专题:88. Merge Sorted Array

88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and nums2 are m and n respectiv...
分类: 其他 发布时间: 08-19 22:37 阅读次数: 0

LeetCode专题:231. Power of Two

Power of Two Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 Output: true Explanation: 24 = 16 Exam...
分类: 其他 发布时间: 08-19 22:37 阅读次数: 0