What is the hazard-rate of a truncated probability distribution? Suppose $X$ is a random variable with pdf and cdf in forms of $f(X)$ and $F(X)$, with hazard-rate $h(X)$. Now, we define a new variable $Y$ which is a truncated random variable, $Y=X, \quad 
\text{if } X \le a$, and $Y=0, \quad  \text{if } X > a$. I am wondering what is the hazard-rate of the random variable $Y$? For example, if $X$ is a geometric random, what is the hazard-rate of $Y$?

I'll start by showing you the answer to your question, but then I'll discuss a complication you need to be aware of when interpreting this answer.  Suppose we have a non-negative continuous random variable $X$ and we truncate it to give the random variable:
$$Y=\min(X,a).$$
The hazard rate for $Y$ can be written in terms of the underlying hazard of $X$ as:
$$\begin{align}
\lambda_Y(y) 
= \frac{f_Y(y)}{1-F_Y(y)} 
&= \begin{cases}
\lambda_X(y) & & & \text{if } y < a, \\[12pt]
1 & & & \text{if } y = a, \\[12pt]
\text{NA} & & & \text{if } y > a. \\[12pt]
\end{cases}
\end{align}$$
As you can see, the hazard function for the truncated random variable is the same as the hazard function for the underlying variable prior to the truncation point.  At the truncation point the hazard jumps up to one (reflecting the fact that the instantaneous probability of failure is one at that point) and then it is non-defined (since failure has already occurred with probability one).
Now, while the hazard function itself is quite simple, the interpretation of the hazard function in this case is complicated.  This is because you are looking at a density of a "mixed" random variable that is continuous over most of its range but with a discrete point-mass at one particular point.  When you define the density of a random variable like this, the probability density over the continuous part is made with respect to Lebesgue measure and the density over the point-mass is made with respect to counting measure, so the values of the density in these different parts are comparing apples and oranges.  So, it is perfectly simple to define the hazard function for a truncated random variable, but it is tricky to interpret this hazard rate.
In terms of interpretation, it is useful to go back to the notion of the hazard function as an "instantaneous" probability/density of failure given survival up to that time.  In the present case, for any value $0 \leqslant x < a$ and an infinitesimal value $dx$ we have the conditional probabilities:
$$\begin{align}
\mathbb{P}(x \leqslant Y \leqslant  x + dx | Y \geqslant x) 
&= \lambda_Y(x) dx = \lambda_X(x) dx, \\[6pt]
\mathbb{P}(Y=a | Y \geqslant a) 
&= \lambda_Y(a) = 1. \\[6pt]
\end{align}$$
Observe here that the hazard function is giving a density (rate-of-change in probability) prior to the point $a$ but it is giving a probability at the point $a$.  Consequently, you have to be careful when making hazard comparisons.  If you have $\lambda_X(x)=1$ for some $0 \leqslant x<a$ that does not mean that the hazard is the same at points $x$ and $a$.  (In technical terms, the hazard rates at these points are taken with respect to a different "dominating measure".)
